/* Explorer-only styles. Tokens, buttons, tables and the header come from /assets/site.css. */
[hidden] { display: none !important; }
.ex section { padding: 0; } /* site.css pads every <section> for landing pages */
.ex { padding-top: 36px; padding-bottom: 12px; }
.ex-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px 32px; margin-bottom: 22px; }
.ex-head h1 { font-size: var(--title); margin-bottom: 6px; }
.ex-head p { margin: 0; font-size: var(--intro); max-width: 34em; }

/* access switch */
.access { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
.seg { display: inline-flex; padding: 3px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.seg button { font: inherit; font-size: 14px; font-weight: 600; border: 0; background: none; color: var(--muted); padding: 7px 14px; border-radius: 8px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.keyfield { display: flex; gap: 8px; }
.keyfield input { width: 230px; }
.access .anote { font-size: 13px; color: var(--muted); }

/* inputs not covered by site.css */
.ex input[type=search], .ex input[type=password], .ex input[type=text], .ex select {
  width: 100%; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; min-width: 0;
}
.ex input::placeholder { color: var(--muted); opacity: .8; }

/* tabs */
.xtabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.xtabs button { font: inherit; font-weight: 600; font-size: 15px; background: none; border: 0; color: var(--muted); padding: 11px 16px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.xtabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.xtabs button:hover { color: var(--ink); }
.xtabs .xtab-link { margin-left: auto; align-self: center; font-size: 14.5px; font-weight: 600; padding: 8px 4px; }  /* a page of its own, not a tab: pushed to the end of the row */

.notice { margin: 0 0 18px; padding: 12px 16px; border-radius: 10px; border: 1px solid var(--bad); color: var(--bad); background: color-mix(in srgb, var(--bad) 8%, var(--surface)); font-size: 15px; }
.notice.info { border-color: var(--accent); color: var(--ink); background: var(--accent-soft); }

/* search */
.searchbar { position: relative; }
.ex .searchbar input[type=search] { padding: 15px 16px 15px 48px; font-size: 17px; border-radius: 14px; box-shadow: var(--shadow); }
.searchbar svg { position: absolute; left: 16px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 22px; align-items: center; }
.chips .lead { font-size: 13px; color: var(--muted); margin-right: 4px; }
.chip { font: inherit; font-size: 14px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); border-radius: 999px; padding: 6px 13px; cursor: pointer; }
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }  /* the active filter must be visible */

.ex-split { display: grid; grid-template-columns: 1fr; gap: 22px; align-items: start; }
@media (min-width: 901px) { .ex-split.has-results { grid-template-columns: minmax(280px, 360px) 1fr; } }

/* result list */
.results { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; position: sticky; top: 78px; max-height: calc(100vh - 100px); overflow: auto; padding-right: 2px; }
@media (max-width: 900px) { .results { position: static; max-height: 360px; } }
.results:empty { display: none; }
.results .state { padding: 18px; text-align: center; color: var(--muted); background: var(--surface); border: 1px dashed var(--line); border-radius: 12px; font-size: 15px; }
.result { width: 100%; text-align: left; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; cursor: pointer; display: grid; gap: 4px; }
.result:hover { border-color: var(--muted); }
.result[aria-current="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); background: var(--accent-soft); }
.result .rn { font-weight: 650; line-height: 1.3; }
.result .rs { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.result .rnav { font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 600; }

/* detail card */
.card-lg { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 24px; box-shadow: var(--shadow); }
.empty { text-align: center; padding: 56px 24px; color: var(--muted); }
.empty h3 { color: var(--ink); font-size: 19px; margin-bottom: 6px; }
.empty p { margin: 0 auto; max-width: 26em; }
.d-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; align-items: flex-start; }
.d-top h2 { font-size: 24px; line-height: 1.25; margin-bottom: 4px; }
.d-house { color: var(--muted); font-size: 15px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.tagx { font-size: 12.5px; font-weight: 600; background: var(--bg); color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; }
.d-nav { text-align: right; }
.d-nav .big { font-size: 34px; font-weight: 780; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.d-nav .sub { font-size: 13px; color: var(--muted); margin-top: 4px; }
.delta { display: inline-block; font-size: 13px; font-weight: 700; border-radius: 999px; padding: 2px 9px; background: var(--bg); color: var(--muted); font-variant-numeric: tabular-nums; }
.delta.pos { background: color-mix(in srgb, var(--good) 14%, var(--bg)); color: var(--good); }
.delta.neg { background: color-mix(in srgb, var(--bad) 12%, var(--bg)); color: var(--bad); }
.pos { color: var(--good); } .neg { color: var(--bad); }
@media (max-width: 560px) { .d-nav { text-align: left; } }

.sect { margin-top: 28px; }
.sect > h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sect > h3 .right { text-transform: none; letter-spacing: 0; font-weight: 500; }

/* 52 week range */
.range52 { margin-top: 22px; }
.range52 .track { position: relative; height: 6px; background: var(--line); border-radius: 999px; margin: 26px 0 8px; }
.range52 .fill { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, color-mix(in srgb, var(--bad) 60%, var(--line)), color-mix(in srgb, var(--good) 70%, var(--line))); border-radius: 999px; opacity: .55; width: 100%; }
.range52 .pin { position: absolute; top: -26px; transform: translateX(-50%); font-size: 12px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.range52 .pin::after { content: ""; display: block; width: 2px; height: 22px; background: var(--accent); margin: 2px auto 0; border-radius: 2px; }
.range52 .ends { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* stat tiles */
.tiles2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.tile2 { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.tile2 .l { font-size: 12.5px; color: var(--muted); }
.tile2 .v { font-size: 20px; font-weight: 720; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }

/* chart */
.chart-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.ranges { display: inline-flex; gap: 4px; padding: 3px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; }
.ranges button { font: inherit; font-size: 13px; font-weight: 600; background: none; border: 0; color: var(--muted); padding: 5px 11px; border-radius: 7px; cursor: pointer; }
.ranges button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(16,24,40,.12); }
.chart { position: relative; height: 240px; touch-action: pan-y; }
.chart svg { width: 100%; height: 100%; display: block; }
.chart .axis { position: absolute; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; pointer-events: none; }
.chart .cross { position: absolute; top: 0; bottom: 18px; width: 1px; background: var(--muted); opacity: .5; pointer-events: none; }
.chart .dot { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--accent); border: 2px solid var(--surface); pointer-events: none; }
.chart .tip { position: absolute; top: 4px; transform: translateX(-50%); background: var(--ink); color: var(--bg); font-size: 12.5px; padding: 5px 9px; border-radius: 8px; white-space: nowrap; pointer-events: none; font-variant-numeric: tabular-nums; }
.muted-p { color: var(--muted); margin: 0; }

/* holdings */
.hold { width: 100%; }
.hold td, .hold th { padding: 9px 10px; vertical-align: middle; }
.hold .w { width: 38%; min-width: 120px; }
.bar { display: flex; align-items: center; gap: 10px; }
.bar i { display: block; height: 7px; border-radius: 999px; background: var(--accent); opacity: .85; min-width: 2px; }
.bar b { font-weight: 600; font-variant-numeric: tabular-nums; font-size: 14px; min-width: 3.4em; text-align: right; }
.hold-wrap { overflow-x: auto; }
.sectors { display: grid; gap: 8px; margin-bottom: 18px; }
.sectors .row2 { display: grid; grid-template-columns: minmax(90px, 170px) 1fr; gap: 12px; align-items: center; font-size: 14px; }
.holdbar { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin-bottom: 10px; }
.linkbtn { font: inherit; font-size: 14px; color: var(--accent); background: none; border: 0; cursor: pointer; padding: 6px 0; font-weight: 600; }
.ex select.small { width: auto; padding: 6px 10px; font-size: 14px; }

/* playground */
.pg { display: grid; grid-template-columns: minmax(280px, 360px) 1fr; gap: 22px; align-items: start; }
@media (max-width: 900px) { .pg { grid-template-columns: 1fr; } }
.pg label { margin-top: 14px; }
.pg label:first-child { margin-top: 0; }
.pg .btn { width: 100%; justify-content: center; margin-top: 18px; padding: 12px 18px; }
.pg .hint { font-size: 13.5px; color: var(--muted); margin: 8px 0 0; }
.urlbar { background: var(--code-bg); color: var(--code-ink); border-radius: 12px 12px 0 0; padding: 12px 16px; overflow-x: auto; white-space: nowrap; font-size: 13px; border: 1px solid #1d2840; border-bottom: 0; }
.respbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: #0c121d; color: var(--code-dim); padding: 8px 12px; font-size: 13px; border: 1px solid #1d2840; border-bottom: 0; }
.respbar .sp { flex: 1; }
.respbar button { font: inherit; font-size: 12.5px; background: none; color: var(--code-ink); border: 1px solid #2a3a5a; border-radius: 7px; padding: 4px 10px; cursor: pointer; }
.respbar button:hover { background: #1b2740; }
.status { font-weight: 700; font-size: 12.5px; padding: 2px 10px; border-radius: 999px; border: 1px solid #2a3a5a; color: var(--code-ink); }
.status.ok { color: #7ee2a0; border-color: #2c6b45; } .status.err { color: #ff9a92; border-color: #7a3a36; }
.json { margin: 0; background: var(--code-bg); color: var(--code-ink); padding: 16px 18px; border-radius: 0 0 12px 12px; border: 1px solid #1d2840; max-height: 560px; overflow: auto; font-size: 13px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.json .k { color: var(--code-key); } .json .s { color: var(--code-str); } .json .n { color: var(--code-num); }

.ex-foot { margin: 36px 0 0; font-size: 14px; color: var(--muted); }

/* the NAV box: right of the name when there is room, a full-width strip under it when there is not (2026-11-18) */
.card-lg:has(.d-top) { container-type: inline-size; }
.d-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px 24px; }
.d-nav { text-align: right; display: grid; justify-items: end; align-content: start; gap: 4px; padding: 14px 16px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); min-width: 210px; }
.d-nav .lbl { font: 600 11px/1 var(--mono, ui-monospace); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.d-nav .sub { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 6px; margin-top: 2px; }
@container (max-width: 640px) {
  .d-top { grid-template-columns: minmax(0, 1fr); }
  .d-nav { justify-items: start; text-align: left; grid-template-columns: auto 1fr; column-gap: 14px; align-items: baseline; min-width: 0; }
  .d-nav .lbl { grid-column: 1 / -1; }
  .d-nav .sub { justify-content: flex-start; }
}

/* Stitch explorer screen: icons on the section tabs, a mono "Try" label, cards with a softer shadow */
.xtabs button { display: inline-flex; align-items: center; gap: 8px; }
.xtabs button .i { width: 16px; height: 16px; }
.xtabs button[aria-selected="true"] { color: var(--accent); }
.chips .lead { font: 600 11px/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); align-self: center; }
.linkbtn.inline { padding: 0; }
