/* Quiet finance UI: white ground, hairline borders, one accent, generous space.
   All selectors are on the page's own classes (nx-…): bare tags would restyle the dashboard itself. */
.nx { display: flex; flex-direction: column; gap: 28px; max-width: 1200px; margin: 0 auto; font-family: var(--font-anthropic-sans); font-size: var(--cds-font-size-body); line-height: 1.45; color: var(--color-fg); min-width: 0; }

/* Header: the logo, the cut-off, the review status */
.nx-head { display: flex; flex-direction: column; gap: 10px; }
.nx-brand { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.nx-logo { display: inline-flex; background: #ffffff; border-radius: 6px; padding: 6px 8px; }
.nx-logo-img { display: block; height: 24px; width: auto; }
.nx-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.nx-asof, .nx-review { font-size: var(--cds-font-size-caption); border-radius: 999px; padding: 3px 10px; border: 1px solid var(--color-border-line); color: var(--color-fg-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.nx-asof b { color: var(--color-fg); font-weight: var(--cds-font-weight-medium); }
.nx-review { border-color: var(--color-warn); color: var(--color-warn); font-weight: var(--cds-font-weight-medium); letter-spacing: .02em; }
.nx-title { font-family: var(--font-anthropic-sans); font-weight: 600; font-size: 22px; line-height: 1.2; margin: 6px 0 0; letter-spacing: -.01em; }
.nx-lede { margin: 0; max-width: 84ch; color: var(--color-fg-muted); }
.nx-lede b { color: var(--color-fg); font-weight: 600; font-variant-numeric: tabular-nums; }

/* Tabs and the entity filter */
.nx-bar { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: flex-end; justify-content: space-between; border-bottom: 1px solid var(--color-border-line); }
.nx-tabs { display: flex; flex-wrap: wrap; gap: 0 4px; }
.nx-tab { font: inherit; color: var(--color-fg-muted); background: none; border: 0; border-bottom: 2px solid transparent; padding: 8px 10px; cursor: pointer; margin-bottom: -1px; }
.nx-tab:hover { color: var(--color-fg); }
.nx-tab.nx-on { color: var(--color-fg); border-bottom-color: var(--nx-accent, var(--color-fg)); font-weight: 600; }
.nx-tab:focus-visible, .nx-click:focus-visible, .nx-link:focus-visible { outline: 2px solid var(--nx-accent, var(--color-fg)); outline-offset: 2px; }
.nx-seg { display: inline-flex; border: 1px solid var(--color-border-line); border-radius: 8px; overflow: hidden; margin-bottom: 6px; }
.nx-seg-b { font: inherit; font-size: var(--cds-font-size-caption); color: var(--color-fg-muted); background: none; border: 0; padding: 5px 12px; cursor: pointer; box-shadow: 1px 0 0 var(--color-border-line); }
.nx-seg-b:hover { color: var(--color-fg); }
.nx-seg-b.nx-on { color: var(--color-fg); font-weight: 600; background: color-mix(in srgb, var(--nx-accent, var(--color-fg)) 12%, transparent); }
.nx-seg-b:focus-visible { outline: 2px solid var(--nx-accent, var(--color-fg)); outline-offset: -2px; }
.nx-subtabs { display: flex; flex-wrap: wrap; gap: 6px; }
.nx-subtab { font: inherit; font-size: var(--cds-font-size-caption); color: var(--color-fg-muted); background: none; border: 1px solid var(--color-border-line); border-radius: 999px; padding: 4px 12px; cursor: pointer; }
.nx-subtab:hover { color: var(--color-fg); }
.nx-subtab.nx-on { color: var(--color-fg); font-weight: 600; border-color: var(--nx-accent, var(--color-fg)); background: color-mix(in srgb, var(--nx-accent, var(--color-fg)) 10%, transparent); }
.nx-subtab:focus-visible { outline: 2px solid var(--nx-accent, var(--color-fg)); outline-offset: 2px; }
.nx-view { display: flex; flex-direction: column; gap: 32px; min-width: 0; }
.nx-view[hidden] { display: none; }
.nx-filter { display: flex; align-items: center; gap: 8px; font-size: var(--cds-font-size-caption); color: var(--color-fg-muted); padding-bottom: 6px; }

/* Page structure */
.nx-page { display: flex; flex-direction: column; gap: 32px; min-width: 0; }
.nx-if-group[hidden], .nx-if-entity[hidden], .nx-page[hidden], .nx-block[hidden], .nx-panel[hidden], .nx-two[hidden], .nx-grid[hidden], .nx-picked[hidden], .nx-info[hidden], .nx-card-d[hidden] { display: none; }
.nx-block { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.nx-panel { border: 1px solid var(--color-border-line); border-radius: var(--cds-radius); padding: 18px 20px; background: var(--color-panel); }
.nx-h { font-family: var(--font-anthropic-sans); font-size: 15px; font-weight: 600; margin: 0; letter-spacing: -.005em; }
.nx-sub { margin: -6px 0 0; color: var(--color-fg-muted); font-size: var(--cds-font-size-caption); max-width: 96ch; }
.nx-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; }
.nx-two > * { min-width: 0; }

/* Basis and caveats, folded away so the page stays quiet */
.nx-info { font-size: var(--cds-font-size-caption); color: var(--color-fg-muted); max-width: 96ch; }
.nx-info summary { cursor: pointer; width: fit-content; color: var(--color-fg-muted); text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 3px; list-style: none; }
.nx-info summary::-webkit-details-marker { display: none; }
.nx-info[open] summary { margin-bottom: 6px; color: var(--color-fg); }
.nx-info p { margin: 0 0 6px; }

/* Headline figures: one strip, cells divided by hairlines */
.nx-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); border: 1px solid var(--color-border-line); border-radius: var(--cds-radius); background: var(--color-panel); }
.nx-card { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; min-width: 0; box-shadow: 1px 0 0 var(--color-border-line), 0 1px 0 var(--color-border-line); }
.nx-card-l { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--color-fg-muted); }
.nx-card-v { font-family: var(--font-anthropic-sans); font-weight: 600; font-size: 24px; line-height: 1.2; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.nx-card-d { font-size: var(--cds-font-size-caption); color: var(--color-fg-muted); font-variant-numeric: tabular-nums; }
.nx-good { color: var(--color-ok); } .nx-warn { color: var(--color-warn); } .nx-bad { color: var(--color-bad); }
.nx-quiet { color: var(--color-fg-muted); font-size: var(--cds-font-size-caption); margin: 0; }

/* Tables */
.nx-scroll { overflow-x: auto; }
.nx-table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
.nx-table th { text-align: left; font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--color-fg-muted); padding: 8px 12px 8px 0; border-bottom: 1px solid var(--color-border-line); white-space: nowrap; }
.nx-table td { padding: 9px 12px 9px 0; border-bottom: 1px solid var(--color-border-line); vertical-align: top; }
.nx-table tr:last-child td { border-bottom: 0; }
.nx-table th.nx-num, .nx-table td.nx-num { text-align: right; white-space: nowrap; padding-right: 0; padding-left: 12px; }
.nx-table tr.nx-click { cursor: pointer; }
.nx-table tr.nx-click:hover td { background: color-mix(in srgb, var(--color-fg) 3%, transparent); }
.nx-table tr.nx-sel td { background: color-mix(in srgb, var(--nx-accent, var(--color-fg)) 8%, transparent); }
.nx-table tr.nx-total td { font-weight: 600; border-top: 1px solid var(--color-fg-muted); }
.nx-table tr.nx-section td { font-weight: 600; padding-top: 16px; color: var(--color-fg-muted); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
.nx-table a, .nx-link { color: inherit; text-decoration: underline; text-decoration-color: var(--color-fg-muted); text-underline-offset: 2px; }
.nx-link { font: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.nx-muted-line { display: block; color: var(--color-fg-muted); font-size: var(--cds-font-size-caption); }
.nx-pill { display: inline-block; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--color-border-line); font-size: 11px; white-space: nowrap; color: var(--color-fg-muted); }
.nx-pill.nx-good { border-color: var(--color-ok); color: var(--color-ok); } .nx-pill.nx-warn { border-color: var(--color-warn); color: var(--color-warn); } .nx-pill.nx-bad { border-color: var(--color-bad); color: var(--color-bad); }

/* Overview widgets: a plain heading, the numbers and a small chart, in the manner of an accounting dashboard */
.nx-wgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); gap: 16px; }
.nx-widget { gap: 10px; min-width: 0; }
.nx-whead { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.nx-open { font: inherit; font-size: var(--cds-font-size-caption); color: var(--color-fg-muted); background: none; border: 0; padding: 2px 0; cursor: pointer; white-space: nowrap; }
.nx-open:hover { color: var(--color-fg); }
.nx-open:focus-visible { outline: 2px solid var(--nx-accent, var(--color-fg)); outline-offset: 2px; }
.nx-figs { display: flex; flex-wrap: wrap; gap: 6px 32px; }
.nx-figs[hidden] { display: none; }
.nx-fig { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.nx-fig[hidden], .nx-widget[hidden], .nx-card[hidden], .nx-table[hidden] { display: none; }
.nx-fig-l { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--color-fg-muted); }
.nx-fig-v { font-weight: 600; font-size: 24px; line-height: 1.2; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.nx-fig-p { font-size: var(--cds-font-size-caption); color: var(--color-fg-muted); font-variant-numeric: tabular-nums; }
.nx-scope { margin-left: 8px; font-weight: 400; text-transform: none; letter-spacing: 0; vertical-align: middle; }
.nx-scope[hidden] { display: none; }
.nx-pl3 { display: flex; flex-wrap: wrap; gap: 14px 0; }
.nx-pl3[hidden], .nx-pl3-col[hidden] { display: none; }
.nx-pl3-col { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.nx-pl3-col + .nx-pl3-col { padding-left: 28px; margin-left: 28px; border-left: 1px solid var(--color-border-line); }
.nx-pl3-h { margin: 0; font-size: var(--cds-font-size-caption); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 640px) { .nx-pl3 { flex-direction: column; gap: 0; } .nx-pl3-col + .nx-pl3-col { padding: 12px 0 0; margin: 12px 0 0; border-left: 0; border-top: 1px solid var(--color-border-line); } }
.nx-mini { min-height: 132px; }
.nx-lines { min-height: 220px; }

/* Descriptions live behind a small "i": shown on hover or keyboard focus, never as a paragraph on the page */
.nx-block, .nx-card, .nx-panel { position: relative; }
.nx-i { display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; margin-left: 6px; border: 1px solid var(--color-border-line); border-radius: 50%; font-size: 10px; font-weight: 600; font-style: normal; line-height: 1; letter-spacing: 0; text-transform: none; color: var(--color-fg-muted); cursor: help; vertical-align: 1px; }
.nx-i:hover, .nx-i:focus { color: var(--color-fg); border-color: var(--color-fg-muted); outline: none; }
.nx-i-tip { display: none; position: absolute; left: 12px; right: 12px; align-self: flex-start; margin-top: 22px; z-index: 20; max-width: 380px; padding: 8px 10px; border: 1px solid var(--color-border-line); border-radius: 6px; background: var(--color-panel); box-shadow: 0 4px 16px rgba(0, 0, 0, .14); color: var(--color-fg-muted); font-size: var(--cds-font-size-caption); font-weight: 400; line-height: 1.4; letter-spacing: 0; text-transform: none; text-align: left; white-space: normal; cursor: default; }
.nx-i:hover .nx-i-tip, .nx-i:focus .nx-i-tip, .nx-go:focus-visible .nx-i-tip { display: block; }
/* One-line text in a list; the full text shows on hover */
.nx-clip { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* A headline figure that opens its detail when pressed */
.nx-card.nx-go { font: inherit; color: inherit; text-align: left; background: none; border: 0; border-radius: var(--cds-radius); cursor: pointer; }
.nx-card.nx-go:hover { background: color-mix(in srgb, var(--nx-accent, var(--color-fg)) 6%, transparent); }
.nx-card.nx-go:focus-visible { outline: 2px solid var(--nx-accent, var(--color-fg)); outline-offset: -2px; }
.nx-card.nx-go .nx-card-l::after { content: '›'; float: right; font-size: 14px; line-height: 1; color: var(--color-fg-muted); }
/* Back control at the top of a detail view, and the quiet row of further links under a summary */
.nx-crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: var(--cds-font-size-caption); color: var(--color-fg-muted); }
.nx-crumb .nx-link { color: var(--color-fg); }
.nx-more { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: var(--cds-font-size-caption); color: var(--color-fg-muted); margin: 0; }
.nx-hint { color: var(--color-fg-muted); font-size: var(--cds-font-size-caption); margin: 0; }

/* Shown only when a source behind the figures was cut short */
.nx-partial { display: none; margin: 0; }
.nx-partial.nx-on { display: block; color: var(--color-warn); }
/* Long names with no spaces wrap instead of pushing the page sideways */
.nx-key, .nx-card-d, .nx-sub, .nx-quiet, .nx-lede { overflow-wrap: anywhere; }
.nx-table td { overflow-wrap: break-word; }
.nx-chart .nx-click:focus-visible { outline: 2px solid var(--nx-accent, var(--color-fg)); outline-offset: 2px; }

/* Two stacked tables that share column widths */
.nx-table.nx-fixed { table-layout: fixed; min-width: 760px; }
.nx-table.nx-fixed th:first-child { width: 26%; }
.nx-table.nx-fixed th { white-space: normal; }

/* Charts */
.nx-chart { position: relative; min-height: 120px; }
.nx-chart .nx-tick { font-size: 11px; font-family: var(--font-anthropic-sans); fill: var(--color-fg-muted); }
.nx-chart .nx-val { font-size: 11px; font-family: var(--font-anthropic-sans); fill: var(--color-fg); font-variant-numeric: tabular-nums; }
.nx-chart .nx-gl { stroke: var(--color-border-line); } .nx-chart .nx-axis { stroke: color-mix(in srgb, var(--color-fg-muted) 60%, transparent); }
.nx-chart .nx-click { cursor: pointer; }
.nx-tip { position: absolute; z-index: 5; pointer-events: none; background: var(--color-panel); border: 1px solid var(--color-border-line); box-shadow: 0 4px 16px rgba(0, 0, 0, .14); border-radius: 6px; padding: 6px 10px; font-size: var(--cds-font-size-caption); color: var(--color-fg-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.nx-tip-h { color: var(--color-fg); font-weight: 600; }
.nx-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: var(--cds-font-size-caption); color: var(--color-fg-muted); }
.nx-key { display: inline-flex; align-items: center; gap: 6px; }
.nx-key i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }

/* Small pieces */
.nx-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; max-width: 96ch; }
.nx-picked { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: var(--cds-font-size-caption); color: var(--color-fg-muted); }
.nx-notes { border-top: 1px solid var(--color-border-line); padding-top: 14px; font-size: var(--cds-font-size-caption); color: var(--color-fg-muted); max-width: 96ch; }
.nx-notes summary { cursor: pointer; color: var(--color-fg); }
.nx-notes dt { color: var(--color-fg); margin-top: 10px; font-weight: 600; }
.nx-notes dd { margin: 2px 0 0; }
[data-dash-source-state="refreshing"] { opacity: .5; }

/* Ask box */
.nx-ask[hidden] { display: none; }
.nx-ask-row { display: flex; gap: 8px; flex-wrap: wrap; }
.nx-ask-q { flex: 1 1 260px; min-width: 0; font: inherit; color: var(--color-fg); background: var(--color-bg); border: 1px solid var(--color-border-line); border-radius: 8px; padding: 8px 10px; }
.nx-ask-go { font: inherit; font-weight: 600; color: var(--color-bg); background: var(--color-fg); border: 0; border-radius: 8px; padding: 8px 16px; cursor: pointer; }
.nx-ask-go[disabled] { opacity: .5; cursor: default; }
.nx-ask-a { margin: 0; white-space: pre-wrap; max-width: 96ch; }

/* Settings */
.nx-set { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--color-border-line); position: relative; }
.nx-set:last-child { border-bottom: 0; }
.nx-set-col { flex-direction: column; align-items: stretch; }
.nx-set-l { min-width: 0; }
.nx-set-c { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.nx-set-u { color: var(--color-fg-muted); font-size: var(--cds-font-size-caption); min-width: 2.2em; }
.nx-in { font: inherit; font-variant-numeric: tabular-nums; width: 9em; text-align: right; color: var(--color-fg); background: var(--color-bg); border: 1px solid var(--color-border-line); border-radius: 6px; padding: 5px 8px; }
.nx-in-wide { width: 100%; text-align: left; font-variant-numeric: normal; box-sizing: border-box; }
.nx-in:invalid { border-color: var(--color-bad); }
.nx-checks { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 6px 16px; }
.nx-check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.nx-code { margin: 0; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: var(--cds-font-size-caption); color: var(--color-fg); background: color-mix(in srgb, var(--color-fg) 4%, transparent); border-radius: 6px; padding: 8px 10px; overflow-wrap: anywhere; user-select: all; }

/* Compact spacing (Settings) */
.nx.nx-compact { gap: 16px; }
.nx-compact .nx-page, .nx-compact .nx-view { gap: 16px; }
.nx-compact .nx-wgrid { gap: 10px; }
.nx-compact .nx-panel { padding: 12px 14px; }
.nx-compact .nx-card { padding: 10px 12px; }
.nx-compact .nx-card-v, .nx-compact .nx-fig-v { font-size: 20px; }
.nx-compact .nx-table td { padding-top: 5px; padding-bottom: 5px; }
.nx-compact .nx-mini { min-height: 110px; }

/* A chart beside its figures (break-even): side by side when there is room, stacked when not */
.nx-side { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.nx-side > .nx-side-main { flex: 2 1 420px; min-width: 0; }
.nx-side > .nx-side-figs { flex: 1 1 240px; min-width: 0; }
.nx-table tr.nx-sub td { color: var(--color-fg-muted); }
.nx-table tr.nx-gap td { border-top: 1px solid var(--color-border-line); padding-top: 14px; }
.nx-table td.nx-pad-l, .nx-table th.nx-pad-l { padding-left: 28px; }
.nx-table td.nx-indent { padding-left: 16px; color: var(--color-fg-muted); }

/* The period a profit and loss figure covers, beside its heading */
.nx-period { margin-left: 8px; font-weight: 400; font-size: var(--cds-font-size-caption); color: var(--color-fg-muted); white-space: nowrap; }
