/* Fieldnote pages: the opteryx.app marketing look (brand tokens from
   web.opteryx static/css/style.css), on system fonts. The one exception is
   the header wordmark, which uses the two self-hosted faces shared by every
   Opteryx app (Space Grotesk 600 "Opteryx" + IBM Plex Sans 400 product). */
@font-face {
    font-family: "Space Grotesk";
    src: url("/runtime/fonts/space-grotesk-600.woff2") format("woff2");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "IBM Plex Sans";
    src: url("/runtime/fonts/ibm-plex-sans-400.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
:root {
    --teal: #07797c;
    --orange: #ca4c00;
    --navy: #1f2e61;
    --bg: #ffffff;
    --surface: #f8fafc;
    --text: #3d4a4e;
    --text-deep: #1f2e61;
    --muted: #5f6b78;
    --border: #d9e2e8;
    --hairline: rgba(61, 74, 78, 0.1);
    --danger: #cb0101;
    --ok: #188038;
    --series-1: #07797c;
    --series-2: #ca4c00;
    --series-3: #1f2e61;
    --series-4: #8db9ba;
    --series-5: #e39a5b;
    --series-6: #5f6b78;
    --series-7: #6b3fa0;
    --series-8: #b08a00;
    --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
* {
    box-sizing: border-box;
}
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.6 var(--font-body);
}
a {
    color: var(--teal);
}
.mono {
    font-family: var(--font-mono);
}
.nb-wrap {
    max-width: 980px;
    margin: 0 auto;
    padding: 0 20px;
}

.nb-top {
    border-bottom: 1px solid var(--hairline);
}
.nb-top-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    height: 60px;
}
/* The shared Opteryx wordmark: mark, "Opteryx" in Space Grotesk 600 navy,
   then the product name lowercase in IBM Plex Sans 400 muted. Docs and
   Studio use the same form. */
.nb-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 17px;
    line-height: 1;
    color: var(--text-deep);
    text-decoration: none;
    white-space: nowrap;
}
.nb-brand svg {
    flex: none;
}
.nb-brand-name {
    font-family: "Space Grotesk", var(--font-body);
    font-weight: 600;
    letter-spacing: -0.01em;
}
.nb-brand-sub {
    font-family: "IBM Plex Sans", var(--font-body);
    font-weight: 400;
    color: var(--muted);
}
.nb-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 15px;
}
.nb-nav a {
    color: var(--text);
    text-decoration: none;
    white-space: nowrap;
}
/* Signed in: "Start free" has nothing to offer. */
.is-signed-in .nb-nav .nb-cta {
    display: none;
}
.nb-nav .nb-cta {
    white-space: nowrap;
    padding: 7px 14px;
    border-radius: 8px;
    background: var(--navy);
    color: #fff;
}

.nb-source {
    margin: 22px 0 0;
    font-size: 13px;
    color: var(--muted);
}
#fieldnote {
    padding-bottom: 40px;
}
#fieldnote[aria-busy="true"]:empty::after {
    content: "Running the fieldnote…";
    display: block;
    padding: 40px 0;
    color: var(--muted);
}

.nb-header {
    padding-bottom: 8px;
}
.nb-title {
    margin: 8px 0 6px;
    font-size: 40px;
    line-height: 1.12;
    color: var(--text-deep);
    letter-spacing: -0.01em;
}
.nb-subtitle {
    margin: 0 0 18px;
    font-size: 19px;
    color: var(--text);
}
.nb-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 8px;
    padding: 0;
    list-style: none;
}
.nb-badges li {
    padding: 3px 10px;
    border-radius: 999px;
    border: 1px solid var(--border);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-deep);
}
.nb-badges .hot {
    border-color: var(--danger);
    color: var(--danger);
}
.nb-badges .warn {
    border-color: var(--orange);
    color: var(--orange);
}

.nb-section {
    margin-top: 36px;
    padding-top: 20px;
    border-top: 1px solid var(--hairline);
}
.nb-section h2 {
    margin: 0 0 6px;
    font-size: 22px;
    color: var(--text-deep);
}
/* The gallery: one card per fieldnote. The image is an illustration of the
   fieldnote's subject, not a screenshot of it. The title's link is stretched
   over the whole card; example links sit above it so they stay clickable. */
.nb-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin: 28px 0 48px;
    padding: 0;
    list-style: none;
}
.nb-gallery-item {
    position: relative;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg);
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.nb-gallery-item:hover,
.nb-gallery-item:focus-within {
    border-color: var(--teal);
    box-shadow: 0 6px 20px rgba(31, 46, 97, 0.1);
    transform: translateY(-2px);
}
.nb-gallery-img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    border-bottom: 1px solid var(--hairline);
}
.nb-gallery-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 14px 18px 16px;
}
.nb-gallery-tag {
    align-self: flex-start;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
}
.nb-gallery-item h2 {
    margin: 0 0 6px;
    font-size: 19px;
    line-height: 1.3;
}
.nb-gallery-item h2 a {
    color: var(--text-deep);
    text-decoration: none;
}
.nb-gallery-item h2 a::after {
    content: "";
    position: absolute;
    inset: 0;
}
.nb-gallery-item h2 a:focus-visible {
    outline: none;
}
.nb-gallery-item:has(h2 a:focus-visible) {
    outline: 2px solid var(--teal);
    outline-offset: 2px;
}
.nb-gallery-item p {
    margin: 0 0 10px;
    font-size: 15px;
    color: var(--muted);
}
.nb-gallery-item .nb-gallery-try {
    position: relative;
    margin: auto 0 0;
    padding-top: 4px;
    font-size: 14px;
}
@media (prefers-reduced-motion: reduce) {
    .nb-gallery-item {
        transition: none;
    }
    .nb-gallery-item:hover,
    .nb-gallery-item:focus-within {
        transform: none;
    }
}

.nb-intro,
.nb-caption {
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 15px;
}
.nb-text {
    margin: 0 0 12px;
}
.nb-error {
    margin: 16px 0;
    color: var(--danger);
}

.nb-facts {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 14px 24px;
    margin: 0 0 12px;
}
.nb-facts dt {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--muted);
}
.nb-facts dd {
    margin: 2px 0 0;
    font-size: 17px;
    color: var(--text-deep);
    overflow-wrap: anywhere;
}
.nb-facts .tone-hot {
    color: var(--danger);
    font-weight: 600;
}
.nb-facts .tone-ok {
    color: var(--ok);
}

.nb-meter {
    max-width: 520px;
    margin: 6px 0 14px;
}
.nb-meter-head {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
}
.nb-meter-head strong {
    color: var(--text-deep);
}
.nb-meter-track {
    height: 10px;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--border);
    overflow: hidden;
    margin: 4px 0 6px;
}
.nb-meter-track i {
    display: block;
    height: 100%;
    background: var(--orange);
}

.nb-table-wrap {
    overflow-x: auto;
    margin: 0 0 10px;
}
.nb-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.nb-table th,
.nb-table td {
    padding: 7px 12px 7px 0;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--hairline);
}
.nb-table th {
    white-space: nowrap;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
}
.nb-table th.num,
.nb-table td.num {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
/* Identifiers and dates never wrap; prose columns take the remaining width. */
.nb-table td.nowrap {
    white-space: nowrap;
}
.nb-table td.wide {
    width: 100%;
}

.nb-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 10px;
    margin: 0 0 10px;
    padding: 0;
    list-style: none;
}
.nb-links a {
    display: inline-block;
    padding: 4px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: var(--font-mono);
    font-size: 13px;
    text-decoration: none;
}
.nb-links a:hover {
    border-color: var(--teal);
}

.nb-studio-row {
    margin: 4px 0 0;
}
.nb-studio {
    font-size: 14px;
    font-weight: 600;
    color: var(--orange);
    text-decoration: none;
}
.nb-studio:hover {
    text-decoration: underline;
}

.nb-search {
    display: flex;
    gap: 8px;
    max-width: 520px;
    margin: 6px 0 16px;
}
.nb-search input {
    flex: 1 1 auto;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font: 15px var(--font-mono);
}
.nb-search button {
    padding: 10px 16px;
    border: 0;
    border-radius: 8px;
    background: var(--navy);
    color: #fff;
    font: 600 15px var(--font-body);
    cursor: pointer;
}

.nb-foot {
    border-top: 1px solid var(--hairline);
    padding: 24px 0 40px;
    font-size: 14px;
    color: var(--muted);
}

@media (max-width: 640px) {
    .nb-title {
        font-size: 30px;
    }
    .nb-nav .nb-nav-extra,
    .nb-nav .nb-cta,
    .nb-brand-sub,
    .nb-auth-who {
        display: none;
    }
    .nb-nav {
        gap: 12px;
    }
}

/* ---- v2 cells (engine.js, charts.js) ---------------------------------- */
.nb-row {
    display: grid;
    gap: 16px;
    margin: 16px 0;
}
.nb-toolbar {
    align-items: end;
    padding: 14px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
}
.nb-cell {
    min-width: 0;
    transition: opacity 0.15s;
}
.nb-stale {
    opacity: 0.45;
}
.nb-card {
    margin: 16px 0;
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: 10px;
}
.nb-row > .nb-card {
    margin: 0;
}
.nb-card h2 {
    margin: 0 0 4px;
    font-size: 17px;
    color: var(--text-deep);
}
.nb-card .nb-caption {
    margin: 0 0 10px;
}
.nb-card-foot {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 20px;
    align-items: baseline;
}
.nb-card-foot .nb-studio-row {
    margin: 10px 0 0;
}
.nb-data {
    margin-top: 10px;
    font-size: 14px;
    flex-basis: 100%;
}
.nb-data summary {
    cursor: pointer;
    color: var(--muted);
}
.nb-data .nb-table-wrap {
    max-height: 320px;
    overflow: auto;
}
.nb-markdown h2,
.nb-markdown h3 {
    color: var(--text-deep);
    margin: 28px 0 6px;
}
.nb-code {
    margin: 0 0 14px;
    padding: 12px 14px;
    background: var(--surface);
    border: 1px solid var(--hairline);
    border-radius: 6px;
    overflow-x: auto;
    font: 13px/1.5 var(--font-mono);
    color: var(--text-deep);
}
.nb-markdown code {
    font-family: var(--font-mono);
    font-size: 0.9em;
}

.nb-input-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 6px;
}
.nb-input input[type="month"],
.nb-input input[type="date"],
.nb-input input[type="search"] {
    width: 100%;
    padding: 7px 10px;
    font: inherit;
    font-size: 15px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
}
.nb-input input[type="range"] {
    width: 100%;
    accent-color: var(--teal);
}
.nb-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.nb-pill {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    font-size: 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg);
    cursor: pointer;
    user-select: none;
}
.nb-pill input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.nb-pill[data-active="true"] {
    background: var(--teal);
    border-color: var(--teal);
    color: #fff;
}
.nb-pill:focus-within {
    outline: 2px solid var(--teal);
    outline-offset: 2px;
}

.nb-stat-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
}
.nb-stat-value {
    font-size: 30px;
    font-weight: 700;
    color: var(--text-deep);
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}
.nb-stat-sub {
    font-size: 13px;
    color: var(--muted);
}

.nb-bars {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 14px;
}
.nb-bars li {
    display: grid;
    grid-template-columns: minmax(0, 9rem) minmax(0, 1fr) 5.5rem;
    gap: 10px;
    align-items: center;
    padding: 3px 0;
}
.nb-bar-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.nb-bar-track {
    height: 12px;
    background: var(--surface);
    border-radius: 3px;
}
.nb-bar-track i {
    display: block;
    height: 100%;
    background: var(--teal);
    border-radius: 3px;
}
.nb-bar-value {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.nb-line {
    display: block;
    width: 100%;
    height: auto;
    touch-action: pan-y;
}
.nb-line .grid {
    stroke: var(--hairline);
}
.nb-line .tick {
    font-size: 12px;
    fill: var(--muted);
}
.nb-line .series {
    fill: none;
    stroke: var(--teal);
    stroke-width: 1.75;
    stroke-linejoin: round;
}
.nb-line .area {
    fill: var(--teal);
    opacity: 0.08;
}
.nb-line .dot {
    fill: var(--teal);
}
.nb-line .band {
    opacity: 0.16;
}
.nb-line .mark {
    opacity: 0.85;
}
.nb-line .tip {
    font-size: 13px;
    font-weight: 600;
    fill: var(--text-deep);
}

@media (max-width: 640px) {
    .nb-row {
        grid-template-columns: minmax(0, 1fr) !important;
    }
}

.nb-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
    list-style: none;
    margin: 0 0 10px;
    padding: 0;
    font-size: 13px;
    color: var(--muted);
}
.nb-legend i {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    margin-right: 6px;
}
.nb-legend i.nb-legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.nb-legend i.nb-legend-band {
    width: 16px;
    opacity: 0.25;
}
.nb-grouped li {
    grid-template-columns: minmax(0, 9rem) minmax(0, 1fr);
    align-items: start;
    padding: 5px 0;
}
.nb-grouped-bars {
    display: grid;
    gap: 3px;
}
.nb-grouped-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 5.5rem;
    gap: 10px;
    align-items: center;
}
.nb-js {
    min-width: 0;
}
.nb-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 16px;
    margin: 6px 0 4px;
}
.nb-stat.tone-hot .nb-stat-value {
    color: var(--orange);
}
.nb-stat.tone-ok .nb-stat-value {
    color: var(--ok);
}
.nb-subhead {
    margin: 20px 0 6px;
    font-size: 15px;
    color: var(--text-deep);
}

/* ---- threat graph (fieldnotes/demo/cve-trends/graph.js) ---- */
.nb-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin: 0 0 12px;
}
.nb-chips .nb-caption {
    margin: 0 4px 0 0;
}
button.nb-pill {
    font: inherit;
    font-size: 13px;
    color: inherit;
}
.graph-scroll {
    overflow-x: auto;
}
.threat-graph {
    display: block;
    font-family: var(--font-body);
}
.threat-graph .graph-col-title {
    font-weight: 600;
    font-size: 10.5px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    fill: var(--muted);
}
.graph-link {
    fill: none;
    stroke: var(--teal);
    stroke-opacity: 0.32;
    transition: stroke-opacity 120ms ease;
}
.graph-link.is-inherited {
    stroke-dasharray: 4 3;
}
.graph-link-hot {
    fill: none;
    stroke: var(--orange);
    stroke-opacity: 0.75;
    pointer-events: none;
}
.graph-link.is-dim,
.graph-link-hot.is-dim {
    stroke-opacity: 0.06;
}
.graph-node {
    cursor: pointer;
    outline: none;
    transition: opacity 120ms ease;
}
.graph-node.is-dim {
    opacity: 0.22;
}
.graph-box {
    fill: var(--bg);
    stroke: var(--teal);
    stroke-opacity: 0.55;
    stroke-width: 1.2;
}
.graph-node-vendor .graph-box,
.graph-node-group .graph-box {
    fill: #e6f1f1;
    stroke: var(--navy);
}
.graph-node.is-pseudo .graph-box,
.graph-node.is-dead-end .graph-box {
    stroke: #8a96a3;
    stroke-dasharray: 3 2;
}
.graph-box-hot {
    fill: var(--orange);
}
.graph-node:hover .graph-box,
.graph-node:focus-visible .graph-box {
    stroke-width: 2.2;
    stroke-opacity: 1;
}
.threat-graph .graph-label {
    font-size: 11px;
    font-weight: 500;
    fill: var(--text-deep);
}
.threat-graph .graph-badge {
    font-family: var(--font-mono);
    font-size: 9.5px;
    font-weight: 700;
    fill: var(--orange);
}
.threat-graph .graph-sublabel {
    font-family: var(--font-mono);
    font-size: 9px;
    fill: var(--muted);
}
.graph-node.is-pseudo .graph-label,
.graph-node.is-dead-end .graph-label {
    fill: var(--muted);
    font-style: italic;
}
.graph-selection {
    font-size: 14px;
    min-height: 1.4em;
    margin: 8px 0 0;
}
.nb-bars-signed .nb-bar-track {
    position: relative;
    background: linear-gradient(to right, var(--surface) calc(50% - 1px), var(--border) calc(50% - 1px), var(--border) calc(50% + 1px), var(--surface) calc(50% + 1px));
}
.nb-bars-signed .nb-bar-track i {
    position: absolute;
    top: 0;
}
.nb-bar-track i.neg {
    background: var(--orange);
}
.nb-line .zero {
    stroke: var(--muted);
    stroke-opacity: 0.5;
}

/* ---- world map (the map chart, and fieldnotes/demo/global-news/map.js) ---- */
.nb-map svg {
    display: block;
    width: 100%;
    height: auto;
}
.nb-map path {
    stroke: #fff;
    stroke-width: 0.5;
}
.nb-map path.is-clickable {
    cursor: pointer;
}
.nb-map path.is-clickable:hover {
    stroke: var(--navy);
    stroke-width: 1;
}
.nb-map path.is-selected {
    stroke: var(--orange);
    stroke-width: 1.6;
}
.nb-map-legend {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--muted);
    margin: 8px 0 0;
}
.nb-map-gradient {
    flex: 0 1 220px;
    height: 10px;
    border-radius: 3px;
}

/* ---- click to filter (a chart's `select`) ---- */
.nb-pickable {
    cursor: pointer;
}
.nb-bars li.nb-pickable:hover,
.nb-table tr.nb-pickable:hover {
    background: var(--surface);
}
.nb-bars li.nb-picked,
.nb-table tr.nb-picked {
    background: rgba(202, 76, 0, 0.08);
    box-shadow: inset 3px 0 0 var(--orange);
}
.nb-bars li.nb-pickable {
    padding-left: 6px;
    border-radius: 3px;
}
.nb-pickable:focus-visible {
    outline: 2px solid var(--teal);
    outline-offset: 1px;
}
.nb-pick-hint {
    font-size: 13px;
    color: var(--muted);
    margin: 8px 0 0;
}
.nb-map path.nb-pickable:hover {
    stroke: var(--navy);
    stroke-width: 1;
}
.nb-map path.nb-picked {
    stroke: var(--orange);
    stroke-width: 1.6;
}

/* ---- scatter ---- */
.nb-scatter .pt {
    fill-opacity: 0.7;
    stroke: var(--bg);
    stroke-width: 0.75;
}
.nb-scatter .pt.nb-pickable:hover {
    fill-opacity: 1;
    stroke: var(--navy);
}
.nb-scatter .pt.nb-picked {
    fill-opacity: 1;
    stroke: var(--orange);
    stroke-width: 2.5;
}
.nb-line .axis-title {
    font-size: 12px;
    fill: var(--text);
}

/* ---- heatmap ---- */
.nb-heat {
    display: grid;
    gap: 2px;
    font-size: 12px;
    min-width: 320px;
}
.nb-heat-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-right: 6px;
    line-height: 18px;
}
.nb-heat-cell {
    height: 18px;
    border-radius: 2px;
}
.nb-heat-cell.nb-pickable:hover {
    outline: 1px solid var(--navy);
}
.nb-heat-cell.nb-picked {
    outline: 2px solid var(--orange);
}
.nb-heat-tick {
    color: var(--muted);
    white-space: nowrap;
    overflow: visible;
    font-variant-numeric: tabular-nums;
}

/* ---- designer (editor.html, designer.js) ------------------------------ */
.nb-designer {
    display: grid;
    grid-template-columns: minmax(340px, 420px) minmax(0, 1fr);
    gap: 24px;
    padding: 0 20px;
    align-items: start;
}
.nb-panel {
    position: sticky;
    top: 0;
    max-height: 100vh;
    overflow-y: auto;
    padding: 16px 4px 40px 0;
    font-size: 14px;
}
.nb-preview {
    min-width: 0;
    max-width: 980px;
}
.nb-panel-title {
    font-size: 20px;
    color: var(--text-deep);
    margin: 0 0 8px;
}
.nb-panel-head {
    display: grid;
    gap: 8px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}
.nb-panel-error {
    margin: 10px 0;
    padding: 8px 10px;
    border-radius: 8px;
    background: #fdecec;
    color: var(--danger);
}
.nb-note,
.nb-save-state {
    margin: 0;
    font-size: 13px;
    color: var(--muted);
}
.nb-save {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.nb-btn {
    font: inherit;
    font-size: 13px;
    padding: 5px 10px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--bg);
    color: var(--text);
    cursor: pointer;
    text-decoration: none;
}
.nb-btn-main {
    background: var(--teal);
    border-color: var(--teal);
    color: #fff;
}
.nb-cells {
    list-style: none;
    margin: 0;
    padding: 0;
}
.nb-gap {
    padding: 6px 0;
}
.nb-adder {
    font: inherit;
    font-size: 12px;
    color: var(--muted);
    border: 1px dashed var(--border);
    border-radius: 7px;
    background: transparent;
    padding: 3px 6px;
    width: 100%;
}
.nb-cellcard {
    border: 1px solid var(--border);
    border-left: 4px solid var(--teal);
    border-radius: 8px;
    padding: 10px 12px;
    background: var(--bg);
}
.nb-type-input {
    border-left-color: var(--orange);
}
.nb-type-query,
.nb-type-data {
    border-left-color: var(--navy);
}
.nb-type-transform {
    border-left-color: #8db9ba;
}
.nb-type-markdown,
.nb-type-row {
    border-left-color: #c2c9de;
}
.nb-cellcard header {
    display: flex;
    align-items: center;
    gap: 8px;
}
.nb-cellcard header strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.nb-badge {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
}
.nb-cell-tools {
    margin-left: auto;
    display: flex;
    gap: 2px;
}
.nb-tool {
    font: inherit;
    font-size: 12px;
    border: 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    padding: 2px 5px;
    border-radius: 4px;
}
.nb-tool:hover {
    background: var(--surface);
    color: var(--text-deep);
}
.nb-status {
    margin: 2px 0 8px;
    font-size: 12px;
    color: var(--muted);
}
.nb-status.is-error {
    color: var(--danger);
}
.nb-form {
    display: grid;
    gap: 8px;
}
.nb-cellcard .nb-raw {
    display: none;
}
.nb-cellcard.is-json .nb-raw {
    display: grid;
}
.nb-cellcard.is-json > .nb-form {
    display: none;
}
.nb-f {
    display: grid;
    gap: 3px;
}
.nb-f > label {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
}
.nb-f small {
    font-size: 12px;
    color: var(--muted);
}
.nb-f input,
.nb-f select,
.nb-f textarea,
.nb-where-row input,
.nb-builder input,
.nb-builder select {
    font: inherit;
    font-size: 13px;
    padding: 5px 7px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg);
    color: var(--text);
    min-width: 0;
}
.nb-f textarea {
    resize: vertical;
}
.nb-f .mono,
.nb-panel input.mono,
.nb-panel textarea.mono {
    font-family: var(--font-mono);
    font-size: 12px;
}
textarea.is-bad {
    border-color: var(--danger);
    outline-color: var(--danger);
}
.nb-f-check {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}
.nb-where-row,
.nb-measure {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    gap: 4px;
    margin-bottom: 4px;
}
.nb-measure {
    grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr) auto;
    align-items: center;
    font-size: 12px;
}
.nb-builder summary {
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    color: var(--teal);
}
.nb-builder .nb-form {
    margin-top: 6px;
}
.nb-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}
.nb-columns small {
    flex-basis: 100%;
    color: var(--muted);
    font-size: 12px;
}
.nb-chip {
    font-size: 11px;
    padding: 1px 6px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
}
.nb-row-cells {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 2px 8px;
}
@media (max-width: 900px) {
    .nb-designer {
        grid-template-columns: minmax(0, 1fr);
    }
    .nb-panel {
        position: static;
        max-height: none;
    }
}

/* ---- sign-in (auth.js) ---- */
.nb-auth {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}
.nb-auth-who {
    color: var(--muted);
    max-width: 14rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.nb-auth-btn {
    white-space: nowrap;
    font: inherit;
    font-size: 14px;
    padding: 5px 10px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--bg);
    color: var(--text-deep);
    cursor: pointer;
}
.nb-signin {
    max-width: 520px;
}
.nb-signin .nb-btn {
    font-size: 15px;
    padding: 8px 16px;
}
.nb-stat-raw {
    font-size: 20px;
    font-family: var(--font-mono);
    line-height: 1.8;
}
