/* Discovery is a market canvas: one toolbar, a tile field, and details on demand. */
.field-page .site-header { min-height: 76px; padding: 12px 24px; gap: 24px; flex-wrap: nowrap; background: var(--paper); }
.field-page .site-header .brand { min-width: 0; font-size: 28px; padding: 0; }
.field-page .brand small { display: none; }
.field-page .site-header .header-search { order: initial; flex: 1; width: auto; min-width: 180px; max-width: 420px; margin-left: auto; }
.field-page .site-header .account-controls { margin-left: 0; }
.field-page main { max-width: none; padding: 0 24px; min-height: calc(100dvh - 76px); }
.market-workspace .filter-row { min-height: 72px; padding: 12px 0; gap: 16px; border-bottom: 1px solid var(--line); }
.market-workspace .segmented { gap: 4px; }
.market-workspace .segmented a { border-radius: 8px; padding: 10px 16px; border-color: transparent; }
.market-workspace .categories a:not(.selected):hover { background: #8199a612; }
.market-workspace .timeframes { border-radius: 10px; padding: 3px; }
.market-workspace .timeframes a { padding: 7px 14px; }
.market-workspace .opportunity-field { min-height: calc(100dvh - 196px); background: none; }
.market-workspace .opportunity-field .asset-node { position: absolute; width: var(--tile-size, 180px); height: var(--tile-size, 180px); }
.market-workspace .opportunity-field .asset-node.hidden-node { display: none; }
.market-workspace .asset-tile { border-radius: 14%; box-shadow: inset 0 0 24px #00ef6118; }
.market-workspace .opportunity-field .tile-symbol { font-size: 21px; }
.market-workspace .opportunity-field .tile-name { font-size: 14px; max-width: 130px; }
.market-workspace .opportunity-field .tile-dip { font-size: 18px; }
.market-workspace .opportunity-field .tile-content { gap: 5px; }
.market-workspace .opportunity-field .tile-monogram { height: 32px; transform: none; }
.market-workspace .field-status { min-height: 44px; padding: 12px 0; color: var(--muted); }
.market-workspace .design-preview-notice { margin: 0; padding: 10px 0 0; background: transparent; border: 0; font-size: 14px; color: var(--muted); letter-spacing: 0; }
.market-workspace .field-empty h2 { font-size: 24px; margin: 20px 0 8px; }
.market-workspace .field-empty p { max-width: 420px; color: var(--muted); }
@media (max-width: 1000px) {
  .market-workspace .filter-row { flex-wrap: wrap; }
  .field-page .site-header .theme-toggle span { display: none; }
}
@media (max-width: 620px) {
  .field-page .site-header { padding: 12px 16px; flex-wrap: wrap; gap: 12px; }
  .field-page .site-header .brand { font-size: 25px; }
  .field-page .site-header .account-controls { margin-left: auto; flex-basis: auto; }
  .field-page .site-header .header-search { order: 3; min-width: 100%; max-width: none; }
  .field-page main { padding: 0 16px; }
  .market-workspace .categories { gap: 4px; flex-wrap: wrap; justify-content: flex-start; }
  .market-workspace .segmented a { padding: 9px 12px; }
  .market-workspace .timeframes { margin-left: 0; }
  .market-workspace .opportunity-field:has(.asset-tile) { display: grid; grid-template-columns: repeat(2, 1fr); padding: 18px 0; gap: 6px; height: auto; }
  .market-workspace .opportunity-field .asset-node { position: relative; width: calc((100vw - 38px) / 2); height: calc((100vw - 38px) / 2); }
  .market-workspace .field-status { font-size: 14px; align-items: flex-start; }
}

.market-workspace .opportunity-field::before { display: none; }

.tile-opportunity { font-size: 22px; font-weight: 700; line-height: 1.2; color: var(--tile-accent); }
.tile-opportunity small { font-size: 14px; font-weight: 400; margin-left: 3px; }

/* Keep upright content within the diamond's narrow top and bottom. */
.asset-tile .tile-content { width: 100%; gap: 2px; }
.asset-tile .tile-monogram { height: 26px; margin: 0; font-size: 26px; line-height: 1; }
.asset-tile .tile-monogram > * { max-width: 34px; max-height: 26px; font-size: 26px; line-height: 1; object-fit: contain; }
.market-workspace .opportunity-field .tile-content { gap: 2px; }
.market-workspace .opportunity-field .tile-monogram { height: 26px; }
.market-workspace .opportunity-field .tile-name { max-width: 100%; line-height: 1.15; }

.asset-tile.pending { --tile-accent: #a9bdc5; border-color: #47616c; background: #14262e; box-shadow: none; }
.market-workspace .dense-field .tile-name { display: none; }
.market-workspace .opportunity-field.dense-field .tile-symbol { font-size: 18px; }
.market-workspace .opportunity-field.dense-field .tile-monogram { height: 22px; }
.market-workspace .dense-field .tile-monogram > * { max-height: 22px; max-width: 28px; font-size: 22px; }
.market-workspace .dense-field .tile-opportunity { font-size: 20px; }
.status-legend { display: inline-flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.status-legend b { font-weight: 400; display: inline-flex; align-items: center; gap: 6px; }
.status-legend b::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--green); }
.status-legend .watch::before { background: var(--yellow); }
.status-legend .weak::before { background: var(--red); }
@media (max-width: 620px) {
  .market-workspace .dense-field .tile-name { display: block; }
}

.market-workspace .opportunity-field.dense-field .tile-content { gap: 1px; }
.market-workspace .opportunity-field.dense-field .tile-symbol { font-size: 16px; }
.market-workspace .opportunity-field.dense-field .tile-monogram { height: 18px; }
.market-workspace .dense-field .tile-monogram > * { max-height: 18px; max-width: 24px; font-size: 18px; }
.market-workspace .dense-field .tile-opportunity { font-size: 18px; }
@media (max-width: 620px) {
  .market-workspace .opportunity-field.dense-field .tile-symbol { font-size: 21px; }
  .market-workspace .opportunity-field.dense-field .tile-monogram { height: 26px; }
  .market-workspace .dense-field .tile-monogram > * { max-height: 26px; max-width: 34px; font-size: 26px; }
  .market-workspace .dense-field .tile-opportunity { font-size: 22px; }
}

/* Native logo colors on a light badge keep dark wordmarks legible in both themes. */
.brand-svg.brand-asset { filter: none; background: #fff; padding: 2px; border-radius: 4px; object-fit: contain; }

.brand-svg.brand-asset.brand-badge-dark { background: #10232d; }

/* Pointy-top hexagons interlock in offset rows with consistent gutters. */
@media (hover: hover) and (pointer: fine) {
  .honeycomb-field,
  .honeycomb-field * { cursor: var(--honeycomb-cursor, pointer); }
}
.market-workspace .opportunity-field.honeycomb-field:has(.asset-tile) { display: block; padding: 0; }
.market-workspace .honeycomb-field .asset-node { position: absolute; top: 0; left: 0; width: var(--tile-size); height: var(--hex-height); }
.market-workspace .honeycomb-field .asset-tile {
  --hex-shape: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  --hex-fill: linear-gradient(145deg, #124b35, #073023 75%);
  width: 100%; height: 100%; transform: none; clip-path: var(--hex-shape);
  border: 0; border-radius: 0; background: #25885b; box-shadow: none;
}
.market-workspace .honeycomb-field .asset-tile::before { content: ""; position: absolute; inset: 1px; clip-path: var(--hex-shape); background: var(--hex-fill); }
.market-workspace .honeycomb-field .asset-tile.yellow { --hex-fill: linear-gradient(145deg, #49401e, #292713 75%); background: #877135; }
.market-workspace .honeycomb-field .asset-tile.red { --hex-fill: linear-gradient(145deg, #542730, #301b25 75%); background: #a44c5c; }
.market-workspace .honeycomb-field .asset-tile.pending { --hex-fill: #14262e; background: #47616c; }
.market-workspace .honeycomb-field .asset-tile:hover,
.market-workspace .honeycomb-field .asset-tile:focus-visible { background: #e3fff2; outline: none; }
.market-workspace .honeycomb-field .asset-tile:hover::before,
.market-workspace .honeycomb-field .asset-tile:focus-visible::before { inset: 3px; }
.market-workspace .honeycomb-field .tile-content { position: relative; z-index: 1; transform: none; width: 84%; gap: 3px; }
.market-workspace .honeycomb-field .tile-symbol { font-size: 20px; }
.market-workspace .honeycomb-field.dense-field .tile-symbol { font-size: 16px; }
.market-workspace .honeycomb-field.dense-field .tile-monogram { height: 22px; }
.market-workspace .honeycomb-field.dense-field .tile-monogram > * { max-width: 30px; max-height: 22px; }
.market-workspace .honeycomb-field.dense-field .tile-opportunity { font-size: 20px; }
@media (max-width: 620px) {
  .market-workspace .honeycomb-field.dense-field .tile-name { display: none; }
  .market-workspace .honeycomb-field .tile-symbol { font-size: 16px; }
}

/* Warm, flat wax cells and black channels, inspired by the honeycomb reference. */
.field-page { --paper: #0d0c0b; --line: #322c22; --muted: #ab9d85; --green: #f2b33d; }
.field-page .site-header { background: #0d0c0b; }
.field-page .site-header .header-search { background: #1b1915; border-color: #302b22; }
.field-page .header-search input::placeholder { color: #a3947b; }
.field-page .theme-toggle { background: #1b1915; border-color: #393126; color: #cfbea1; }
.field-page .account-controls .header-signup { background: #f2b33d; border-color: #f2b33d; color: #241b0d; }
.market-workspace .timeframes { background: #171410; border-color: #332b20; }
.market-workspace .segmented a { color: #c7baa2; }
.market-workspace .segmented a.selected { background: #f2b33d; border-color: #f2b33d; color: #21190c; }
.market-workspace .honeycomb-field .asset-tile,
.market-workspace .honeycomb-field .asset-tile.score-high {
  --hex-fill: #f2b33d;
  --status-color: #62e0a8;
  background: #0d0c0b;
  color: #271d0f;
}
.market-workspace .honeycomb-field .asset-tile::before { inset: 0; }
.market-workspace .honeycomb-field .asset-tile.score-middle { --hex-fill: #bf7c2a; --status-color: #bf7c2a; background: #0d0c0b; color: #21190e; }
.market-workspace .honeycomb-field .asset-tile.score-low { --hex-fill: #403221; --status-color: #403221; background: #0d0c0b; color: #f1dcb7; }
.market-workspace .honeycomb-field .asset-tile.pending { --hex-fill: #272219; --status-color: #b7a382; background: #0d0c0b; color: #b7a382; }
.market-workspace .honeycomb-field .asset-tile.score-high { background: #25885b; animation: high-score-pulse var(--pulse-duration, 2.4s) ease-in-out var(--pulse-delay, 0s) infinite; }
.market-workspace .honeycomb-field .asset-tile.score-high::before { inset: 4px; }
@keyframes high-score-pulse {
  0%, 100% { background-color: #25885b; }
  50% { background-color: #69efad; }
}
@media (prefers-reduced-motion: reduce) {
  .market-workspace .honeycomb-field .asset-tile.score-high { animation: none; }
}
.market-workspace .honeycomb-field .asset-tile:hover::before,
.market-workspace .honeycomb-field .asset-tile:focus-visible::before { inset: 3px; background: #f4cf81; }
.market-workspace .honeycomb-field .asset-tile.score-high:hover::before,
.market-workspace .honeycomb-field .asset-tile.score-high:focus-visible::before { inset: 4px; background: #634117; }
.market-workspace .honeycomb-field .asset-tile:focus-visible { background: #fff1cc; }
.market-workspace .honeycomb-field .asset-tile:hover,
.market-workspace .honeycomb-field .asset-tile:focus-visible { color: #21190e; }
.market-workspace .honeycomb-field .tile-name { color: inherit; }
.market-workspace .honeycomb-field .tile-opportunity { min-width: 42px; padding: 2px 8px; border-radius: 5px; background: #664512; color: #fff0c6; line-height: 1.15; }
.market-workspace .honeycomb-field .score-middle .tile-opportunity { background: #483418; color: #ffe0a0; }
.market-workspace .honeycomb-field .score-low .tile-opportunity { background: #2b2319; color: #f1dcb7; }
.market-workspace .honeycomb-field .pending .tile-opportunity { background: #373025; color: #b7a382; }
.market-workspace .honeycomb-field .tile-symbol::before { content: ""; display: inline-block; vertical-align: middle; width: 6px; height: 6px; margin-right: 4px; border-radius: 50%; background: #785014; }
.market-workspace .honeycomb-field .score-middle .tile-symbol::before { background: #6c4317; }
.market-workspace .honeycomb-field .score-low .tile-symbol::before { background: #c5a77f; }
.market-workspace .honeycomb-field .pending .tile-symbol::before { background: #a28d6b; }
/* A deeper honey fill makes the brightest cells' hover state distinct and legible. */
.market-workspace .honeycomb-field .asset-tile.score-high:is(:hover, :focus-visible) { color: #fff4d6; }
.market-workspace .honeycomb-field .asset-tile.score-high:is(:hover, :focus-visible) .tile-opportunity { background: #fff1c2; color: #2b2113; }
.market-workspace .honeycomb-field .asset-tile.score-high:is(:hover, :focus-visible) .tile-symbol::before { background: #ffe4a2; }
.market-workspace .honeycomb-field .asset-tile.score-high:is(:hover, :focus-visible) .brand-svg:not(.brand-asset) { background: #fff; padding: 2px; border-radius: 4px; }
.market-workspace .status-legend b::before { background: #f2b33d; }
.market-workspace .status-legend b:not(.watch):not(.weak)::before { box-shadow: 0 0 0 2px #25885b; }
.market-workspace .status-legend .watch::before { background: #bf7c2a; }
.market-workspace .status-legend .weak::before { background: #403221; }
html[data-theme=light] .field-page { --paper: #f6efdf; --line: #ddcfb5; --muted: #7c694b; }
html[data-theme=light] .field-page .site-header { background: #faf5e9; }
html[data-theme=light] .field-page .site-header .header-search,
html[data-theme=light] .field-page .theme-toggle { background: #eee4d0; border-color: #d8c8a9; color: #654f2e; }
html[data-theme=light] .market-workspace .segmented a { color: #705c3b; }
html[data-theme=light] .market-workspace .segmented a.selected { background: #f2b33d; color: #21190c; }
html[data-theme=light] .market-workspace .timeframes { background: #eee4d0; border-color: #d8c8a9; }
.field-page, .field-page main { background: #0d0c0b; }
.market-workspace .honeycomb-field .brand-apple { filter: none; }
html[data-theme=light] .field-page,
html[data-theme=light] .field-page main { background: #f6efdf; }

/* Search and saved groups share the board's hexagons and score palette. */
.field-page .primary-nav { display: none; }
.market-workspace .asset-grid.honeycomb-field {
  display: flex; flex-wrap: wrap; justify-content: center; align-content: center;
  gap: 24px 18px; padding: 36px 0;
}
.catalog-workspace .asset-grid.honeycomb-field { min-height: min(480px, 60dvh); }
.market-workspace .asset-grid.honeycomb-field .asset-node {
  position: relative; top: auto; left: auto;
  --tile-size: 168px; --hex-height: 194px;
  width: var(--tile-size); height: var(--hex-height);
}
.market-workspace .asset-grid.honeycomb-field .tile-symbol { font-size: 21px; }
.market-workspace .asset-grid.honeycomb-field .tile-name { max-width: 135px; font-size: 13px; }
.market-workspace .asset-grid.honeycomb-field .tile-monogram { height: 28px; }
.market-workspace .group-asset { display: flex; flex-direction: column; align-items: center; }
.market-workspace .catalog-caption, .market-workspace .catalog-caption small,
.market-workspace .catalog-footnote { color: var(--muted); }
.market-workspace .catalog-footnote { text-align: center; }
.field-page .group-card { background: #1b1915; border-color: #393126; }
.field-page .catalog-search input:not([type=submit]),
.field-page .catalog-search select { background: #1b1915; border-color: #393126; color: #f1dcb7; }
.field-page .button { background: #f2b33d; border-color: #f2b33d; color: #271d0f; }
.field-page .button.secondary { background: transparent; border-color: #725526; color: #e8d5b2; }
.market-detail { background: #171410; border-color: #4a3a25; color: #f1e4cc; --muted: #ab9d85; }
.market-detail .score-row > div { background: #272219; border-color: #4a3a25; }
.market-detail .score-row > div:first-child strong,
.market-detail .score-row > div:first-child small { color: inherit; }
.market-detail .timestamp { color: var(--muted); }
.market-detail .score-row > div:first-child { border-radius: 10px; padding: 12px; background: #272219; color: #b7a382; }
.market-detail .score-row.score-high > div:first-child { background: #f2b33d; color: #271d0f; border: 3px solid #25885b; animation: detail-score-pulse var(--pulse-duration, 2.4s) ease-in-out var(--pulse-delay, 0s) infinite; }
.market-detail .score-row.score-middle > div:first-child { background: #bf7c2a; color: #21190e; }
.market-detail .score-row.score-low > div:first-child { background: #403221; color: #f1dcb7; }
.market-detail .score-row > div:first-child span { color: inherit; }
@keyframes detail-score-pulse { 0%, 100% { border-color: #25885b; } 50% { border-color: #69efad; } }
@media (prefers-reduced-motion: reduce) {
  .market-detail .score-row.score-high > div:first-child { animation: none; }
}
html[data-theme=light] .market-detail { background: #faf5e9; border-color: #ddcfb5; color: #3f3020; --muted: #7c694b; }
html[data-theme=light] .field-page .group-card,
html[data-theme=light] .field-page .catalog-search input:not([type=submit]),
html[data-theme=light] .field-page .catalog-search select { background: #faf5e9; border-color: #ddcfb5; color: #3f3020; }
html[data-theme=light] .field-page .button.secondary { color: #705c3b; }
@media (max-width: 620px) {
  .market-workspace .asset-grid.honeycomb-field { gap: 20px 12px; }
  .market-workspace .asset-grid.honeycomb-field .asset-node {
    --tile-size: min(168px, calc((100vw - 44px) / 2));
    --hex-height: min(194px, calc((100vw - 44px) / 2 * 1.1547));
  }
}
