/* nekud Markets (Global 500) for Nekud Editorial. Installed with nekud-markets.php. Uses theme tokens so palettes and dark mode carry over. */

body.nk-mkt-page .nk-article__meta,
body.nk-mkt-page .nk-article__actions,
body.nk-mkt-page .nk-article__dek,
body.nk-mkt-page .nk-article__foot,
body.nk-mkt-page .nk-share,
body.nk-mkt-page .nk-toc,
body.nk-mkt-page .nk-notes,
body.nk-mkt-page .nk-toc__mobile,
body.nk-mkt-page .nk-progress { display: none !important; }
body.nk-mkt-page .nk-article__grid,
body.nk-mkt-page .nk-article__grid--wide,
body.nk-mkt-page .nk-article__grid--notoc { grid-template-columns: minmax(0, 1fr); }
body.nk-mkt-page .nk-prose { max-width: none; width: 100%; justify-self: stretch; }
body.nk-mkt-page .nk-prose > * + * { margin-top: 0; }

.nk-mkt {
  --mkt-up: #1f7a4a;
  --mkt-down: #b3372f;
  --mkt-gold: var(--nk-c-gold, #d4a537);
  --mkt-line: color-mix(in srgb, var(--nk-c-border, #b9c0cb) 60%, transparent);
  --mkt-panel: var(--nk-c-surface, #e6e9ee);
  --mkt-card: var(--nk-c-card-bg, #fff);
  color: var(--nk-c-text, #1E2F42);
  font-variant-numeric: tabular-nums;
}
:root[data-theme="dark"] .nk-mkt { --mkt-up: #5fd19a; --mkt-down: #ff8c82; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) .nk-mkt { --mkt-up: #5fd19a; --mkt-down: #ff8c82; }
}
.nk-mkt .is-up { color: var(--mkt-up); }
.nk-mkt .is-down { color: var(--mkt-down); }

.nk-mkt-standfirst {
  font-family: var(--nk-f-body-family, inherit);
  font-size: 1.15em; line-height: 1.5;
  color: var(--nk-c-heading, #14223d);
  margin: 0 0 .5em; max-width: 62ch;
}
.nk-mkt-status { display: flex; align-items: center; gap: .55em; margin: 0 0 1.4em; }
.nk-mkt-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--nk-c-border, #b9c0cb); flex: none; }
.nk-mkt-dot.is-live { background: var(--mkt-gold); box-shadow: 0 0 0 0 color-mix(in srgb, var(--mkt-gold) 60%, transparent); animation: nk-mkt-pulse 2.4s ease-out infinite; }
.nk-mkt-dot.is-warn { background: #e0a03a; }
.nk-mkt-dot.is-err { background: var(--mkt-down); }
@keyframes nk-mkt-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--mkt-gold) 55%, transparent); } 70%, 100% { box-shadow: 0 0 0 9px transparent; } }
@media (prefers-reduced-motion: reduce) { .nk-mkt-dot.is-live { animation: none; } .nk-mkt-table tr { transition: none !important; } }

/* Headline figures */
.nk-mkt-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 0 0 1.6em; }
.nk-mkt-stat {
  display: flex; flex-direction: column; gap: 4px; min-width: 0;
  padding: 16px 18px; background: var(--mkt-card);
  border: 1px solid var(--mkt-line); border-top: 3px solid var(--mkt-gold);
  border-radius: 14px; corner-shape: var(--nk-squircle, round);
}
.nk-mkt-stat__k { font-family: var(--nk-f-meta-family, inherit); font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--nk-c-accent-text, #8B6914); }
.nk-mkt-stat__v { font-family: var(--nk-f-pageHeading-family, inherit); font-size: 1.55em; line-height: 1.15; color: var(--nk-c-heading, #14223d); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nk-mkt-stat__s { display: flex; align-items: center; gap: .4em; font-family: var(--nk-f-meta-family, inherit); font-size: 13.5px; color: var(--nk-c-muted, #3e4d61); }

/* Toolbar */
.nk-mkt-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px;
  margin: 0 0 12px; padding: 14px 16px;
  background: var(--mkt-panel); border: 1px solid var(--mkt-line); border-radius: 14px; corner-shape: var(--nk-squircle, round);
}
.nk-mkt-search { position: relative; flex: 1 1 18rem; display: flex; align-items: center; margin: 0; }
.nk-mkt-search .nk-icon { position: absolute; left: 12px; width: 17px; height: 17px; fill: none; stroke: var(--nk-c-muted, #3e4d61); stroke-width: 2; pointer-events: none; }
.nk-mkt-search input {
  width: 100%; min-height: 42px; box-sizing: border-box; margin: 0;
  padding: 8px 12px 8px 38px; font: inherit; font-size: 15px;
  font-family: var(--nk-f-meta-family, inherit);
  color: var(--nk-c-text, #1E2F42); background: var(--mkt-card);
  border: 1px solid var(--nk-c-border, #b9c0cb); border-radius: 11px; corner-shape: var(--nk-squircle, round);
}
.nk-mkt-search input:focus { outline: 2px solid var(--mkt-gold); outline-offset: 1px; border-color: var(--mkt-gold); }
.nk-mkt-seg { display: inline-flex; gap: 2px; padding: 3px; background: var(--mkt-card); border: 1px solid var(--mkt-line); border-radius: 11px; corner-shape: var(--nk-squircle, round); flex: none; }
.nk-mkt-seg button {
  min-height: 36px; padding: 6px 13px; border: 0; border-radius: 8px; background: transparent; cursor: pointer;
  font-family: var(--nk-f-meta-family, inherit); font-size: 13.5px; font-weight: 500; color: var(--nk-c-muted, #3e4d61);
  transition: background-color .15s ease, color .15s ease;
}
.nk-mkt-seg button:hover, .nk-mkt-seg button:focus-visible { color: #14223d; background: color-mix(in srgb, var(--mkt-gold) 30%, var(--mkt-card)); outline: none; }
.nk-mkt-seg button[aria-pressed="true"] { background: var(--nk-c-primary, #14223d); color: var(--nk-c-on-primary, #fff); }

/* Filters */
.nk-mkt-filters { display: flex; flex-direction: column; gap: 8px; margin: 0 0 12px; }
.nk-mkt-f { background: var(--mkt-card); border: 1px solid var(--mkt-line); border-radius: 12px; corner-shape: var(--nk-squircle, round); }
.nk-mkt-f > summary {
  display: flex; align-items: center; gap: 12px; padding: 11px 16px; cursor: pointer; list-style: none;
  font-family: var(--nk-f-meta-family, inherit); font-size: 15px; font-weight: 600; color: var(--nk-c-heading, #14223d);
}
.nk-mkt-f > summary::-webkit-details-marker { display: none; }
.nk-mkt-f > summary::after { content: ""; margin-left: auto; width: 8px; height: 8px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .15s ease; flex: none; }
.nk-mkt-f[open] > summary::after { transform: rotate(-135deg) translateY(-2px); }
.nk-mkt-f > summary:hover { color: var(--nk-c-accent-text, #8B6914); }
.nk-mkt-f__sel { display: inline-flex; align-items: center; gap: 4px; font-weight: 400; font-size: 13.5px; color: var(--nk-c-muted, #3e4d61); min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.nk-mkt-chips { display: flex; flex-wrap: wrap; gap: 7px; padding: 2px 16px 14px; }
.nk-mkt-chip {
  display: inline-flex; align-items: center; gap: .45em; min-height: 36px; padding: 6px 11px; box-sizing: border-box; margin: 0;
  border: 1px solid var(--nk-c-border, #b9c0cb); border-radius: 11px; corner-shape: var(--nk-squircle, round);
  background: var(--mkt-card); color: var(--nk-c-text, #14223d); cursor: pointer;
  font-family: var(--nk-f-meta-family, inherit); font-size: 13.5px; font-weight: 400; line-height: 1.2; white-space: nowrap;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.nk-mkt-chip:hover, .nk-mkt-chip:focus-visible { background: var(--mkt-gold); border-color: var(--mkt-gold); color: #14223d; outline: none; }
.nk-mkt-chip:focus-visible { outline: 2px solid var(--nk-c-primary, #14223d); outline-offset: 2px; }
.nk-mkt-chip[aria-pressed="true"] { background: var(--nk-c-primary, #14223d); border-color: var(--nk-c-primary, #14223d); color: var(--nk-c-on-primary, #fff); }
.nk-mkt-chip__n { font-size: .85em; color: var(--nk-c-muted, #4f5f74); }
.nk-mkt-chip:hover .nk-mkt-chip__n { color: #14223d; }
.nk-mkt-chip[aria-pressed="true"] .nk-mkt-chip__n { color: inherit; opacity: .8; }
.nk-mkt-note { margin: 0; padding: 0 16px 14px; font-family: var(--nk-f-meta-family, inherit); font-size: 13px; color: var(--nk-c-muted, #3e4d61); }

/* Flags (self-hosted SVG, flag-icons MIT) */
.nk-mkt-flag { display: inline-block; width: 20px; height: 15px; flex: none; object-fit: cover; border-radius: 2px; box-shadow: 0 0 0 1px color-mix(in srgb, var(--nk-c-text, #1E2F42) 16%, transparent); vertical-align: -2px; margin: 0 !important; }
.nk-mkt-flag--sm { width: 16px; height: 12px; }

/* Summary bars */
.nk-mkt-sum { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 32px; padding: 4px 16px 16px; }
.nk-mkt-sum__h { margin: 0 0 8px !important; font-family: var(--nk-f-meta-family, inherit) !important; font-size: 12px !important; font-weight: 700 !important; letter-spacing: .14em; text-transform: uppercase; color: var(--nk-c-accent-text, #8B6914) !important; }
.nk-mkt-bar { display: grid; grid-template-columns: minmax(0, 150px) 1fr auto; align-items: center; gap: 10px; width: 100%; padding: 4px 6px; margin: 0; border: 0; border-radius: 8px; background: transparent; cursor: pointer; text-align: left; font-family: var(--nk-f-meta-family, inherit); font-size: 13.5px; color: var(--nk-c-text, #1E2F42); }
.nk-mkt-bar:hover, .nk-mkt-bar:focus-visible { background: var(--nk-c-hover, #e8eaee); outline: none; }
.nk-mkt-bar__l { display: flex; align-items: center; gap: 6px; min-width: 0; }
.nk-mkt-bar__l span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nk-mkt-bar__t { height: 8px; border-radius: 4px; background: color-mix(in srgb, var(--nk-c-border, #b9c0cb) 40%, transparent); overflow: hidden; }
.nk-mkt-bar__f { display: block; height: 100%; background: var(--mkt-gold); border-radius: 4px; }
.nk-mkt-bar__v { white-space: nowrap; }
.nk-mkt-bar__v small { color: var(--nk-c-muted, #3e4d61); margin-left: 4px; }

.nk-mkt-countrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 14px 0 8px; }
.nk-mkt-count { margin: 0 !important; }
.nk-mkt-clear { padding: 6px 12px; border: 1px solid var(--nk-c-border, #b9c0cb); border-radius: 10px; background: var(--mkt-card); color: var(--nk-c-text, #14223d); cursor: pointer; font-family: var(--nk-f-meta-family, inherit); font-size: 13px; }
.nk-mkt-clear:hover { background: var(--mkt-gold); border-color: var(--mkt-gold); color: #14223d; }

/* Table */
.nk-mkt-tablewrap { background: var(--mkt-card); border: 1px solid var(--mkt-line); border-radius: 14px; corner-shape: var(--nk-squircle, round); overflow: clip; }
html body .nk-mkt.nk-mkt table.nk-mkt-table.nk-mkt-table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 0; font-family: var(--nk-f-meta-family, inherit); font-size: 15px; line-height: 1.35; border: 0; }
html body .nk-mkt.nk-mkt .nk-mkt-table.nk-mkt-table :is(th, td) { padding: 10px 12px; border: 0; border-bottom: 1px solid var(--mkt-line); text-align: left; vertical-align: middle; overflow-wrap: normal; background: transparent; }
html body .nk-mkt.nk-mkt .nk-mkt-table.nk-mkt-table .is-num { text-align: right; white-space: nowrap; }
html body .nk-mkt.nk-mkt .nk-mkt-table.nk-mkt-table thead th {
  position: sticky; top: var(--nk-header-h, 76px); z-index: 2; padding: 0;
  background: var(--nk-c-primary, #14223d); color: var(--nk-c-on-primary, #fff); border-bottom: 0;
}
html body .nk-mkt.nk-mkt .nk-mkt-table.nk-mkt-table thead th button {
  display: flex; align-items: center; gap: 4px; width: 100%; padding: 11px 12px; margin: 0; border: 0; background: transparent; color: inherit; cursor: pointer;
  font: inherit; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; text-align: inherit;
}
html body .nk-mkt.nk-mkt .nk-mkt-table.nk-mkt-table thead th.is-num button { justify-content: flex-end; }
html body .nk-mkt.nk-mkt .nk-mkt-table.nk-mkt-table thead th button:hover, html body .nk-mkt.nk-mkt .nk-mkt-table.nk-mkt-table thead th button:focus-visible { color: var(--mkt-gold); outline: none; }
html body .nk-mkt.nk-mkt .nk-mkt-table.nk-mkt-table thead th[aria-sort="ascending"] button::after { content: "\2191"; color: var(--mkt-gold); }
html body .nk-mkt.nk-mkt .nk-mkt-table.nk-mkt-table thead th[aria-sort="descending"] button::after { content: "\2193"; color: var(--mkt-gold); }
html body .nk-mkt.nk-mkt .nk-mkt-table.nk-mkt-table thead th:first-child { border-top-left-radius: 13px; }
html body .nk-mkt.nk-mkt .nk-mkt-table.nk-mkt-table thead th:last-child { border-top-right-radius: 13px; }
html body .nk-mkt.nk-mkt .nk-mkt-table.nk-mkt-table tbody tr { transition: background-color 1.2s ease; }
html body .nk-mkt.nk-mkt .nk-mkt-table.nk-mkt-table tbody tr:hover td { background: var(--nk-c-hover, #e8eaee); }
html body .nk-mkt.nk-mkt .nk-mkt-table.nk-mkt-table tbody tr:last-child td { border-bottom: 0; }
html body .nk-mkt.nk-mkt .nk-mkt-table.nk-mkt-table tbody tr.is-tick-up td { animation: nk-mkt-up 1.6s ease-out; }
html body .nk-mkt.nk-mkt .nk-mkt-table.nk-mkt-table tbody tr.is-tick-down td { animation: nk-mkt-down 1.6s ease-out; }
@keyframes nk-mkt-up { from { background: color-mix(in srgb, var(--mkt-up) 16%, transparent); } to { background: transparent; } }
@keyframes nk-mkt-down { from { background: color-mix(in srgb, var(--mkt-down) 14%, transparent); } to { background: transparent; } }
.nk-mkt-rank { color: var(--nk-c-muted, #3e4d61); width: 3.2em; }
.nk-mkt-name { min-width: 12rem; }
.nk-mkt-name__n { display: block; font-family: var(--nk-f-cardTitle-family, inherit); font-size: 1.07em; color: var(--nk-c-heading, #14223d); }
.nk-mkt-name__n sup { color: var(--nk-c-accent-text, #8B6914); margin-left: 2px; }
.nk-mkt-name__s { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-top: 2px; font-size: 12.5px; color: var(--nk-c-muted, #3e4d61); letter-spacing: .02em; }
.nk-mkt-idx { display: inline-flex; flex-wrap: wrap; gap: 3px; }
.nk-mkt-idx span { padding: 0 5px; border: 1px solid color-mix(in srgb, var(--mkt-gold) 65%, transparent); border-radius: 5px; font-size: 10.5px; line-height: 16px; color: var(--nk-c-accent-text, #8B6914); letter-spacing: .03em; }
.nk-mkt-country__in { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.nk-mkt-sector span { display: block; }
.nk-mkt-sector small { display: block; font-size: 12.5px; color: var(--nk-c-muted, #3e4d61); }
html body .nk-mkt.nk-mkt .nk-mkt-table.nk-mkt-table td.is-metric { font-weight: 600; color: var(--nk-c-heading, #14223d); }
.nk-mkt-chg.is-up, .nk-mkt-chg.is-down { font-weight: 600; }
html body .nk-mkt.nk-mkt .nk-mkt-table.nk-mkt-table td.nk-mkt-empty { text-align: center; padding: 48px 12px; color: var(--nk-c-muted, #3e4d61); }
.nk-mkt-show-sm { display: none; }

.nk-mkt-sources { margin: 1.4em 0 0 !important; max-width: 90ch; }
.nk-mkt-sources a { color: var(--nk-c-link, #8B6914); }

@media (max-width: 1100px) { .nk-mkt-hide-md { display: none; } }
@media (max-width: 900px) {
  .nk-mkt-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nk-mkt-sum { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .nk-mkt-hide-sm { display: none; }
  .nk-mkt-show-sm { display: inline-flex; }
  html body .nk-mkt.nk-mkt .nk-mkt-table.nk-mkt-table :is(th, td) { padding: 9px 8px; }
  html body .nk-mkt.nk-mkt .nk-mkt-table.nk-mkt-table thead th button { padding: 10px 8px; letter-spacing: .04em; }
  .nk-mkt-name { min-width: 0; }
  .nk-mkt-toolbar { padding: 12px; }
  .nk-mkt-search { flex-basis: 100%; }
  .nk-mkt-countrow { flex-wrap: wrap; }
}
@media (max-width: 520px) {
  .nk-mkt-hide-xs { display: none; }
  html body .nk-mkt.nk-mkt table.nk-mkt-table.nk-mkt-table { font-size: 14px; }
  html body .nk-mkt.nk-mkt .nk-mkt-table.nk-mkt-table :is(th, td) { padding: 8px 6px; }
  .nk-mkt-rank { width: 2.2em; }
  .nk-mkt-stats { gap: 10px; }
  .nk-mkt-stat { padding: 12px 13px; }
  .nk-mkt-stat__v { font-size: 1.25em; }
  .nk-mkt-seg button { padding: 6px 10px; }
  .nk-mkt-bar { grid-template-columns: minmax(0, 110px) 1fr auto; }
  .nk-mkt-idx { display: none; }
}
html body .nk-mkt.nk-mkt .nk-mkt-table.nk-mkt-table thead th { background: var(--nk-c-primary, #14223d); color: var(--nk-c-on-primary, #fff); }
@media (max-width: 760px) {
  html body .nk-mkt.nk-mkt .nk-mkt-table.nk-mkt-table thead th button { white-space: normal; letter-spacing: .02em; font-size: 11px; line-height: 1.2; }
  html body .nk-mkt.nk-mkt .nk-mkt-table.nk-mkt-table td.nk-mkt-name { overflow-wrap: anywhere; }
}
@media (max-width: 520px) {
  html body .nk-mkt.nk-mkt .nk-mkt-table.nk-mkt-table :is(th, td) { padding-left: 5px; padding-right: 5px; }
  html body .nk-mkt.nk-mkt .nk-mkt-table.nk-mkt-table thead th button { padding-left: 5px; padding-right: 5px; }
  .nk-mkt-name__n { font-size: 1em; }
}
/* The theme wraps every prose table in .nk-table-wrap (overflow:auto), which would stop the sticky header. The table already fits its column. */
html body .nk-mkt.nk-mkt .nk-table-wrap { overflow: visible !important; max-width: none; margin: 0 !important; padding: 0 !important; border: 0 !important; box-shadow: none !important; background: transparent !important; }
.nk-mkt-grp { display: inline-block; margin: 2px 0 1px; padding: 1px 7px; border-radius: 6px; background: color-mix(in srgb, var(--mkt-gold) 18%, transparent); color: var(--nk-c-accent-text, #8B6914); font-size: 12px; font-weight: 600; letter-spacing: .01em; }
/* Sources: a quiet disclosure under the status line, not a banner. */
.nk-mkt-src { display: inline; margin-left: .4em; }
.nk-mkt-src > summary { display: inline; cursor: pointer; list-style: none; color: var(--nk-c-link, #8B6914); text-decoration: underline; text-underline-offset: 2px; }
.nk-mkt-src > summary::-webkit-details-marker { display: none; }
.nk-mkt-src[open] > div { margin: .6em 0 0; max-width: 80ch; font-weight: 400; color: var(--nk-c-muted, #3e4d61); }
.nk-mkt-src a { color: var(--nk-c-link, #8B6914); }
.nk-mkt-status { flex-wrap: wrap; }
.nk-mkt-src[open] { flex-basis: 100%; margin-left: 0; }
/* Corner fix (v1.0.1): the wrapper alone rounds and clips the table, with a plain radius so the clip and the
   border always agree (corner-shape: squircle on the wrapper made the round header corner poke out in newer
   Chrome/Edge). Header cells are square; a navy row background and seam cover stop hairlines between cells. */
html body .nk-mkt.nk-mkt .nk-mkt-tablewrap { corner-shape: round !important; border-radius: 14px; overflow: clip; overflow-clip-margin: 0; background: var(--mkt-card); }
@supports not (overflow: clip) { html body .nk-mkt.nk-mkt .nk-mkt-tablewrap { overflow: hidden; } }
html body .nk-mkt.nk-mkt .nk-mkt-table.nk-mkt-table thead th:first-child,
html body .nk-mkt.nk-mkt .nk-mkt-table.nk-mkt-table thead th:last-child { border-radius: 0 !important; }
html body .nk-mkt.nk-mkt .nk-mkt-table.nk-mkt-table thead tr { background: var(--nk-c-primary, #14223d); }
html body .nk-mkt.nk-mkt .nk-mkt-table.nk-mkt-table thead th { box-shadow: 1px 0 0 var(--nk-c-primary, #14223d); background-clip: padding-box; }

/* ---------- Filter cards (v1.1.0) ----------
   Same squircle card recipe as the site's post cards (.nk-card): radius = --nk-radius-card x --nk-sq-k, corner-shape = --nk-squircle,
   so the data-squircle setting switches them with the rest of the site. Nothing inside a card touches its edge with its own
   rounded background, so real-squircle browsers (Chrome/Edge 139+) and round-corner browsers render the same. */
.nk-mkt-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 0 0 12px; }
.nk-mkt-card {
  position: relative; min-width: 0;
  background: var(--nk-c-card-bg, #fff);
  border: var(--nk-border-w, 1px) solid var(--nk-c-border-soft, #dde1e7);
  border-radius: calc(var(--nk-radius-card, 30px) * var(--nk-sq-k, 1));
  corner-shape: var(--nk-squircle, round);
  box-shadow: var(--nk-shadow-card, none);
  transition: border-color .15s ease, box-shadow .15s ease, transform .2s ease;
}
.nk-mkt-card:hover { border-color: var(--mkt-gold); }
.nk-mkt-card.is-open { border-color: var(--nk-c-primary, #14223d); box-shadow: 0 0 0 1px var(--nk-c-primary, #14223d), var(--nk-shadow-card, none); }
.nk-mkt-card.is-filtered:not(.is-open) { border-color: var(--mkt-gold); box-shadow: 0 0 0 1px var(--mkt-gold), var(--nk-shadow-card, none); }
html body .nk-mkt.nk-mkt .nk-mkt-card__main {
  display: flex; flex-direction: column; align-items: stretch; gap: 8px; width: 100%; height: 100%; min-height: 168px; box-sizing: border-box;
  margin: 0; padding: 20px 22px 18px; border: 0; background: transparent; border-radius: 0; box-shadow: none;
  color: var(--nk-c-text, #1E2F42); text-align: left; cursor: pointer; font: inherit;
}
.nk-mkt-card__main:focus { outline: none; }
.nk-mkt-card:has(.nk-mkt-card__main:focus-visible) { outline: 2px solid var(--mkt-gold); outline-offset: 3px; }
.nk-mkt-card__k { font-family: var(--nk-f-meta-family, inherit); font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--nk-c-accent-text, #8B6914); padding-right: 64px; }
.nk-mkt-card__sel { display: flex; align-items: center; gap: 8px; min-width: 0; font-family: var(--nk-f-cardTitle-family, inherit); font-size: 1.3em; line-height: 1.2; color: var(--nk-c-heading, #14223d); }
.nk-mkt-card__sel > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nk-mkt-card__all { color: var(--nk-c-heading, #14223d); }
.nk-mkt-flagstack { display: inline-flex; flex: none; }
.nk-mkt-flagstack .nk-mkt-flag { width: 24px; height: 18px; box-shadow: 0 0 0 2px var(--nk-c-card-bg, #fff); }
.nk-mkt-flagstack .nk-mkt-flag + .nk-mkt-flag { margin-left: -6px !important; }
.nk-mkt-card__prev { display: block; flex: 1 1 auto; min-height: 0; }
.nk-mkt-mini { display: flex; flex-direction: column; gap: 4px; }
.nk-mkt-mini__r { display: flex; align-items: center; gap: 7px; min-width: 0; font-family: var(--nk-f-meta-family, inherit); font-size: 13.5px; color: var(--nk-c-text, #1E2F42); }
.nk-mkt-mini__n { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nk-mkt-mini__v { flex: none; color: var(--nk-c-muted, #3e4d61); font-variant-numeric: tabular-nums; }
.nk-mkt-mini__none { font-size: 13.5px; color: var(--nk-c-muted, #3e4d61); }
.nk-mkt-idxchips { display: flex; flex-wrap: wrap; gap: 4px; }
.nk-mkt-idxchips span { padding: 1px 7px; border: 1px solid color-mix(in srgb, var(--mkt-gold) 65%, transparent); border-radius: 6px; font-family: var(--nk-f-meta-family, inherit); font-size: 12px; line-height: 20px; color: var(--nk-c-accent-text, #8B6914); }
.nk-mkt-idxchips span small { color: var(--nk-c-muted, #3e4d61); font-size: 11px; }
.nk-mkt-idxchips span.is-on { background: var(--nk-c-primary, #14223d); border-color: var(--nk-c-primary, #14223d); color: var(--nk-c-on-primary, #fff); }
.nk-mkt-idxchips span.is-on small { color: inherit; opacity: .8; }
.nk-mkt-stack { display: flex; height: 10px; margin: 2px 0 8px; border-radius: 5px; overflow: hidden; background: color-mix(in srgb, var(--nk-c-border, #b9c0cb) 35%, transparent); }
.nk-mkt-stack span { display: block; height: 100%; }
.nk-mkt-stack span + span { box-shadow: inset 1px 0 0 var(--nk-c-card-bg, #fff); }
.nk-mkt-card__go { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; font-family: var(--nk-f-meta-family, inherit); font-size: 13px; color: var(--nk-c-link, #8B6914); }
.nk-mkt-card__go .nk-icon { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; transition: transform .15s ease; }
.nk-mkt-card.is-open .nk-mkt-card__go .nk-icon { transform: rotate(180deg); }
html body .nk-mkt.nk-mkt .nk-mkt-card__reset {
  position: absolute; top: 16px; right: 16px; z-index: 1; margin: 0;
  padding: 4px 10px; border: 1px solid var(--nk-c-border, #b9c0cb);
  border-radius: calc(var(--nk-radius-control, 10px) * var(--nk-sq-k, 1)); corner-shape: var(--nk-squircle, round);
  background: var(--nk-c-card-bg, #fff); color: var(--nk-c-text, #14223d); cursor: pointer;
  font-family: var(--nk-f-meta-family, inherit); font-size: 12.5px; line-height: 1.3;
}
html body .nk-mkt.nk-mkt .nk-mkt-card__reset:hover, html body .nk-mkt.nk-mkt .nk-mkt-card__reset:focus-visible { background: var(--mkt-gold); border-color: var(--mkt-gold); color: #14223d; outline: none; }

/* Full-width panel under the grid; one open at a time. */
.nk-mkt-panel {
  margin: 0 0 12px; padding: 18px 20px 6px;
  background: var(--nk-c-card-bg, #fff);
  border: var(--nk-border-w, 1px) solid var(--nk-c-border-soft, #dde1e7);
  border-radius: calc(var(--nk-radius-card, 30px) * var(--nk-sq-k, 1));
  corner-shape: var(--nk-squircle, round);
  box-shadow: var(--nk-shadow-card, none);
}
.nk-mkt-panel[hidden] { display: none; }
.nk-mkt-panel__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 12px; padding: 0 4px; }
html body .nk-mkt.nk-mkt .nk-mkt-panel__title { margin: 0 !important; font-family: var(--nk-f-cardTitle-family, inherit) !important; font-size: 1.2em !important; font-weight: 400 !important; color: var(--nk-c-heading, #14223d) !important; }
html body .nk-mkt.nk-mkt .nk-mkt-panel__close { padding: 5px 12px; margin: 0; border: 1px solid var(--nk-c-border, #b9c0cb); border-radius: calc(var(--nk-radius-control, 10px) * var(--nk-sq-k, 1)); corner-shape: var(--nk-squircle, round); background: var(--nk-c-card-bg, #fff); color: var(--nk-c-text, #14223d); cursor: pointer; font-family: var(--nk-f-meta-family, inherit); font-size: 13px; }
html body .nk-mkt.nk-mkt .nk-mkt-panel__close:hover, html body .nk-mkt.nk-mkt .nk-mkt-panel__close:focus-visible { background: var(--mkt-gold); border-color: var(--mkt-gold); color: #14223d; outline: none; }
.nk-mkt-panel .nk-mkt-chips { padding: 0 0 14px; }
.nk-mkt-panel .nk-mkt-note { padding: 0 0 14px; }
.nk-mkt-panel .nk-mkt-sum { padding: 0 0 8px; }

@media (max-width: 1100px) { .nk-mkt-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  .nk-mkt-cards { grid-template-columns: 1fr; gap: 10px; }
  html body .nk-mkt.nk-mkt .nk-mkt-card__main { min-height: 0; padding: 16px 18px 14px; }
  .nk-mkt-panel { padding: 14px 14px 4px; }
}
/* Phones: compact one-line cards (title, selection, chevron); the preview lives in the opened panel instead. */
@media (max-width: 560px) {
  html body .nk-mkt.nk-mkt .nk-mkt-card__main { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "k go" "sel go"; align-items: center; gap: 2px 10px; padding: 14px 18px; }
  .nk-mkt-card__k { grid-area: k; padding-right: 0; }
  .nk-mkt-card__sel { grid-area: sel; font-size: 1.15em; }
  .nk-mkt-card__prev { display: none; }
  .nk-mkt-card__go { grid-area: go; margin: 0; font-size: 0; }
  .nk-mkt-card__go .nk-icon { width: 18px; height: 18px; }
  .nk-mkt-card.is-filtered .nk-mkt-card__go { margin-right: 62px; }
  html body .nk-mkt.nk-mkt .nk-mkt-card__reset { top: 50%; transform: translateY(-50%); right: 14px; }
}

/* Company website links (v1.2.0) */
html body .nk-mkt.nk-mkt .nk-mkt-name__n { display: inline; }
html body .nk-mkt.nk-mkt .nk-mkt-grp { display: block; width: fit-content; }
html body .nk-mkt.nk-mkt a.nk-mkt-site {
  color: var(--nk-c-heading, #14223d) !important; text-decoration: none !important;
  background-image: linear-gradient(currentColor, currentColor); background-size: 0 1px; background-repeat: no-repeat; background-position: 0 100%;
  transition: color .15s ease, background-size .2s ease; border: 0 !important; box-shadow: none !important;
}
html body .nk-mkt.nk-mkt a.nk-mkt-site:hover,
html body .nk-mkt.nk-mkt a.nk-mkt-site:focus-visible { color: var(--nk-c-link, #8B6914) !important; background-size: 100% 1px; outline: none; }
html body .nk-mkt.nk-mkt a.nk-mkt-site:focus-visible { outline: 2px solid var(--mkt-gold); outline-offset: 2px; border-radius: 3px; }
.nk-mkt-ext { display: inline-block; width: .72em; height: .72em; margin-left: .3em; vertical-align: .05em; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transform: translate(-2px, 2px); transition: opacity .15s ease, transform .15s ease; }
a.nk-mkt-site:hover .nk-mkt-ext, a.nk-mkt-site:focus-visible .nk-mkt-ext { opacity: .85; transform: none; }
@media (hover: none) { .nk-mkt-ext { opacity: .55; transform: none; } }
