/* Notebook pages: the opteryx.app marketing look (brand tokens from
   web.opteryx static/css/style.css), on system fonts. */
: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;
    --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;
}
.nb-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-deep);
    font-weight: 700;
    text-decoration: none;
}
.nb-brand-sub {
    font-weight: 500;
    color: var(--muted);
}
.nb-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 15px;
}
.nb-nav a {
    color: var(--text);
    text-decoration: 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);
}
#notebook {
    padding-bottom: 40px;
}
#notebook[aria-busy="true"]:empty::after {
    content: "Running the notebook…";
    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);
}
.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 a:not(.nb-cta) {
        display: none;
    }
}
