/* Commentary landing page and shared search-form presentation.
   The MarketDeck shell loads after this file and owns the global tokens. */

.commentary-home { background: #070b10; }
.commentary-home main.home-main { max-width: none; padding: 0 clamp(20px, 3vw, 44px) 44px; }
.home-workspace { width: min(100%, 1540px); margin: 0 auto; }

.home-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(350px, .72fr);
  gap: clamp(28px, 4vw, 64px);
  min-height: 560px;
  align-items: center;
  padding: clamp(44px, 6vw, 86px) 0 42px;
}
.home-intro { position: relative; z-index: 1; min-width: 0; }
.home-eyebrow,
.home-guide-eyebrow,
.home-strip-label {
  margin: 0 0 12px;
  color: #7f8d9e;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.home-intro h1 {
  max-width: 19ch;
  margin: 0;
  color: #f4f7fb;
  font-size: clamp(32px, 3.3vw, 40px);
  font-weight: 750;
  line-height: 1.08;
  letter-spacing: -.045em;
}
.home-intro h1 span { color: #d5deea; }
.home-lede {
  max-width: 70ch;
  margin: 22px 0 26px;
  color: #b4bfcd;
  font-size: 15px;
  line-height: 1.65;
}

.home-search {
  position: relative;
  max-width: 830px;
  padding: 14px;
  border: 1px solid #293846;
  border-radius: 12px;
  background: #0d131b;
  box-shadow: 0 18px 48px rgba(0, 0, 0, .2);
}
.mode-tabs { display: inline-flex; gap: 6px; margin: 0 0 12px; }
.mode-tab {
  min-width: 108px;
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid #293846;
  border-radius: 7px;
  background: #121a24;
  color: #b4bfcd;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.mode-tab:hover { border-color: #3a4d60; color: #f4f7fb; }
.mode-tab[aria-selected="true"] { border-color: #176fd1; background: rgba(19, 146, 253, .09); color: #f4f7fb; box-shadow: inset 0 -2px #1392fd; }
.search-tips { position: absolute; top: 24px; right: 17px; color: #7f8d9e; font-size: 11px; }
.mode-panel[hidden] { display: none; }

.home-search .search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 12px;
  align-items: end;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.home-search .search-form > .field-row:first-child { grid-column: 1 / -1; }
.home-search .search-form > .field-row:first-child label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
.home-search .search-form > .field-row:first-child .help { display: none; }
.home-search .search-form > .field-row:first-child input { width: 100%; min-height: 48px; padding: 0 14px; font-size: 14px; }
.home-search .search-form > .field-row:nth-child(2) { grid-column: 1; }
.home-search .search-form > .field-row:last-child { grid-column: 2; }
.home-search .field-row { min-width: 0; }
.home-search .field-row > label,
.home-source-disclosure .source-label { margin: 0 0 6px; color: #7f8d9e; font-size: 11px; font-weight: 600; }
.home-search .radio-row { display: flex; flex-wrap: wrap; gap: 6px; }
.home-search .radio-row label {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 11px;
  border: 1px solid #293846;
  border-radius: 6px;
  background: #121a24;
  color: #b4bfcd;
  font-size: 12px;
  cursor: pointer;
}
.home-search .radio-row label:has(input:checked) { border-color: #176fd1; background: rgba(19, 146, 253, .09); color: #f4f7fb; }
.home-search .radio-row input { width: auto; margin: 0 6px 0 0; accent-color: #1392fd; }
.home-search .custom-range { display: none; grid-column: 1 / -1; }
.home-search .search-form:has(input[name="window"][value="custom"]:checked) .custom-range { display: flex; }
.home-search .date-row { display: flex; gap: 8px; }
.home-search .date-row input { min-width: 0; }
.home-search .btn-primary { min-width: 170px; min-height: 40px; padding: 0 18px; white-space: nowrap; }
.home-search .scanning { grid-column: 1 / -1; }

.home-source-disclosure { position: relative; grid-column: 1; min-width: 0; }
.home-source-disclosure > summary {
  display: flex;
  align-items: end;
  gap: 10px;
  min-height: 38px;
  padding: 0;
  color: #d5deea;
  cursor: pointer;
  list-style: none;
}
.home-source-disclosure > summary::-webkit-details-marker { display: none; }
.home-source-disclosure > summary::after { content: "Choose"; margin-left: auto; color: #eef4fb; font-size: 11px; text-decoration: underline; text-underline-offset: .2em; }
.home-source-disclosure .source-label { display: block; margin: 0; }
.home-source-disclosure .source-preview { display: flex; align-items: center; min-width: 0; }
.home-source-disclosure .source-preview span { display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border: 1px solid #293846; border-radius: 6px; background: #121a24; color: #b4bfcd; font-size: 12px; white-space: nowrap; }
.home-source-disclosure[open] .channel-picker {
  position: absolute;
  z-index: 35;
  top: calc(100% + 8px);
  left: 0;
  width: min(720px, calc(100vw - 64px));
  max-height: 420px;
  overflow: auto;
  margin: 0;
  box-shadow: 0 24px 64px rgba(0, 0, 0, .5);
}
.channel-picker { border-color: #293846; background: #121a24; }
.channel-picker .cat-group { border-color: #293846; }
.chip-check { border-color: #293846; background: #0d131b; color: #b4bfcd; }
.chip-check:has(input:checked) { border-color: #176fd1; background: rgba(19, 146, 253, .09); color: #f4f7fb; }

.home-guide {
  position: relative;
  min-width: 0;
  overflow: hidden;
  padding: 30px;
  border: 1px solid #293846;
  border-radius: 12px;
  background: #0d131b;
}
.home-network {
  position: absolute;
  inset: 0 0 auto;
  height: 210px;
  opacity: .16;
  background: url('../images/home-master-intelligence-network.png') no-repeat 58% 34% / 760px auto;
  pointer-events: none;
}
.home-guide > *:not(.home-network) { position: relative; z-index: 1; }
.home-guide-eyebrow { margin-bottom: 10px; color: #1392fd; }
.home-guide h2 { max-width: 18ch; margin: 0; color: #f4f7fb; font-size: clamp(21px, 2vw, 28px); line-height: 1.18; letter-spacing: -.035em; }
.home-guide-intro { margin: 14px 0 24px; color: #b4bfcd; font-size: 13px; line-height: 1.6; }
.verification-flow { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.verification-flow li { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 14px; padding: 16px 0; border-top: 1px solid #1b2734; }
.verification-flow li > span { color: #7f8d9e; font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 11px; font-weight: 600; }
.verification-flow h3 { margin: 0 0 4px; color: #eef4fb; font-size: 14px; }
.verification-flow p { margin: 0; color: #7f8d9e; font-size: 12px; line-height: 1.55; }
.home-guide-links { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 16px; }
.home-guide-links a { color: #eef4fb; font-size: 12px; font-weight: 600; text-decoration: underline; text-underline-offset: .2em; }

.home-features { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0 0 26px; }
.home-features article { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 14px; min-width: 0; padding: 18px; border: 1px solid #1b2734; border-radius: 8px; background: #0d131b; }
.feature-icon { width: 48px; height: 48px; background-repeat: no-repeat; background-position: center; background-size: 48px 48px; opacity: .8; }
.feature-stock { background-image: url('../images/home-master-feature-stock.png'); }
.feature-transcript { background-image: url('../images/home-master-feature-transcript.png'); }
.feature-timestamps { background-image: url('../images/home-master-feature-timestamps.png'); }
.feature-narratives { background-image: url('../images/home-master-feature-narratives.png'); }
.home-features h2 { margin: 2px 0 6px; color: #eef4fb; font-size: 14px; }
.home-features p { margin: 0; color: #7f8d9e; font-size: 12px; line-height: 1.55; }

.home-coverage { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, .8fr); gap: 22px; align-items: center; padding: 18px 0; border-top: 1px solid #1b2734; border-bottom: 1px solid #1b2734; }
.home-coverage-left { min-width: 0; }
.home-strip-label { margin-bottom: 10px; }
.home-source-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.home-source-pills a { min-height: 32px; display: inline-flex; align-items: center; padding: 0 10px; border: 1px solid #293846; border-radius: 6px; color: #d5deea; font-size: 11px; text-decoration: none; }
.home-source-pills a:hover { border-color: #3a4d60; background: #121a24; color: #f4f7fb; }
.home-scope { margin: 0; padding-left: 22px; border-left: 1px solid #293846; color: #7f8d9e; font-size: 11px; line-height: 1.65; }
.home-disclaimer { margin-top: 24px; }
.home-disclaimer > h2 { color: #eef4fb; font-size: 15px; }

@media (max-width: 1320px) {
  .home-features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1180px) {
  .home-hero { grid-template-columns: minmax(0, 1fr); min-height: 0; padding-top: 48px; }
  .home-intro h1 { max-width: 22ch; }
  .home-guide { width: min(100%, 720px); }
}

@media (max-width: 850px) {
  .commentary-home main.home-main { padding-inline: 18px; }
  .home-hero { padding-top: 36px; }
  .home-search .search-form { grid-template-columns: minmax(0, 1fr); }
  .home-search .search-form > .field-row:first-child,
  .home-search .search-form > .field-row:nth-child(2),
  .home-search .search-form > .field-row:last-child,
  .home-source-disclosure { grid-column: 1; }
  .home-search .btn-primary { width: 100%; }
  .home-coverage { grid-template-columns: minmax(0, 1fr); }
  .home-scope { padding: 14px 0 0; border-left: 0; border-top: 1px solid #293846; }
}

@media (max-width: 600px) {
  .commentary-home main.home-main { padding: 0 14px 32px; }
  .home-hero { gap: 26px; padding: 30px 0 28px; }
  .home-intro h1 { font-size: clamp(30px, 9vw, 38px); }
  .home-lede { margin: 18px 0 22px; font-size: 14px; }
  .home-search { padding: 11px; }
  .mode-tabs { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .mode-tab { min-width: 0; min-height: 44px; }
  .search-tips { display: none; }
  .home-search .radio-row label { min-height: 40px; }
  .home-source-disclosure > summary { min-height: 44px; }
  .home-source-disclosure .source-preview span { min-height: 40px; }
  .home-source-disclosure[open] .channel-picker { position: fixed; inset: auto 12px 12px; width: auto; max-height: 68vh; }
  .home-guide { padding: 22px; }
  .home-features { grid-template-columns: minmax(0, 1fr); }
  .home-features article { min-height: 0; }
  .home-source-pills a { min-height: 40px; }
}

/* Original Commentary hero, reintegrated inside the MarketDeck shell. */
.commentary-home {
  background:
    radial-gradient(ellipse at 76% 19%, rgba(8, 48, 64, .62) 0, transparent 34%),
    linear-gradient(180deg, #000b17 0%, #070b10 68%, #070b10 100%);
}
.commentary-home main.home-main { padding-top: 0; }
.home-hero {
  isolation: isolate;
  grid-template-columns: minmax(0, 1.48fr) minmax(400px, .92fr);
  gap: 24px;
  min-height: 596px;
  align-items: start;
  padding: 0 0 34px;
  overflow: visible;
}
.home-intro { z-index: 2; padding-top: 42px; }
.home-eyebrow {
  margin-bottom: 10px;
  color: #79f4ec;
  font-size: 11px;
  line-height: 18px;
  letter-spacing: .2em;
}
.home-intro h1 {
  max-width: none;
  margin: 0 0 14px;
  color: #f4f7fb;
  font-size: clamp(42px, 4vw, 56px);
  line-height: .98;
  letter-spacing: -.048em;
}
.home-intro h1 span { color: #62eae1; }
.home-lede {
  width: 670px;
  max-width: 100%;
  margin: 0 0 17px;
  color: #b4bfcd;
  font-size: clamp(16px, 1.35vw, 19px);
  line-height: 1.36;
}

main.home-main .home-search {
  max-width: none;
  min-height: 210px;
  padding: 14px 16px 15px;
  border-color: #294f5d;
  border-radius: 10px;
  background: rgba(7, 19, 29, .96);
  box-shadow: 0 18px 46px rgba(0, 0, 0, .24), inset 0 1px rgba(121, 244, 236, .04);
}
main.home-main .home-search .mode-tabs { height: 46px; margin: 0 0 4px; gap: 4px; }
main.home-main .home-search .mode-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 134px;
  min-height: 46px;
  border-color: #293846;
  border-radius: 7px;
  background: #121a24;
  color: #b4bfcd;
  font-size: 14px;
}
main.home-main .home-search .mode-tab[aria-selected="true"] {
  border-color: #4bcfc9;
  background: rgba(24, 119, 126, .2);
  color: #7af1e9;
  box-shadow: inset 0 -2px #56ddd5;
}
.home-search .tab-icon { color: #71ebe4; font-size: 20px; line-height: 1; }
.search-tips { top: 28px; right: 22px; color: #7f8d9e; font-size: 12px; }
.search-tips span { margin-left: 5px; color: #b4bfcd; }
.home-search .search-form { grid-template-columns: minmax(0, 1fr) auto; }
.home-search .search-form > .field-row:first-child { position: relative; }
.home-search .search-form > .field-row:first-child input {
  min-height: 48px;
  border-color: #35495c;
  background: #0d1823;
}
.home-search .radio-row label:has(input:checked) {
  border-color: #3cbeb8;
  background: rgba(24, 119, 126, .18);
  color: #e9fffd;
}
.home-search .btn-primary,
.home-search .btn-primary:hover,
.home-search .btn-primary:focus-visible {
  border-color: #58e4dc;
  background: #5be5dc;
  color: #031b23;
  box-shadow: 0 4px 16px rgba(37, 185, 174, .18);
}

.home-example {
  position: relative;
  z-index: 1;
  width: 100%;
  min-width: 0;
  min-height: 405px;
  margin-top: 166px;
  padding: 12px;
  border: 1px solid #235a65;
  border-radius: 11px;
  background: #07131e;
  box-shadow: 0 20px 52px rgba(0, 0, 0, .35);
}
.home-network {
  position: absolute;
  z-index: -1;
  top: -166px;
  right: -20px;
  left: -520px;
  width: auto;
  height: 372px;
  overflow: hidden;
  opacity: .96;
  pointer-events: none;
  background: url('../images/home-master-intelligence-network.png') no-repeat 0 0 / 1034px 372px;
  mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, .28) 21%, rgba(0, 0, 0, .92) 43%, #000 58%, #000 100%);
}
.example-topline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 12px;
  min-height: 20px;
  margin-bottom: 10px;
}
.example-topline h2 {
  margin: 0;
  color: #7af1e9;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.example-topline-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.example-topline-actions a,
.example-link { color: #dffbf9; font-size: 11px; font-weight: 600; text-decoration: none; }
.example-topline-actions a:hover,
.example-link:hover { color: #fff; text-decoration: underline; text-underline-offset: .2em; }
.example-note { order: -1; color: #7f8d9e; font-size: 9px; letter-spacing: .12em; text-transform: uppercase; }
.example-card {
  position: relative;
  min-height: 360px;
  padding: 13px 12px 10px;
  border: 1px solid #234d59;
  border-radius: 10px;
  background: #081823;
}
.example-media { display: grid; grid-template-columns: minmax(0, 42%) minmax(0, 1fr); gap: 14px; align-items: start; }
.example-thumbnail { position: relative; width: 100%; aspect-ratio: 212 / 129; overflow: hidden; border-radius: 8px; }
.example-thumbnail img { width: 100%; height: 100%; object-fit: cover; }
.thumbnail-play {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(255, 255, 255, .85);
  border-radius: 50%;
  background: rgba(6, 13, 22, .72);
  color: #fff;
  font-size: 14px;
}
.thumbnail-time { position: absolute; right: 5px; bottom: 5px; padding: 3px 5px; border-radius: 4px; background: rgba(0, 0, 0, .82); color: #fff; font-size: 10px; font-weight: 700; }
.example-media-copy { display: flex; min-width: 0; flex-direction: column; gap: 4px; }
.example-media-copy strong { color: #f4f7fb; font-size: 14px; line-height: 1.22; }
.example-source { display: flex; align-items: center; gap: 8px; margin-top: 7px; color: #b4bfcd; font-size: 11px; line-height: 1.5; }
.example-source img { width: 28px; height: 28px; flex: none; border-radius: 50%; }
.example-tags { display: flex; min-width: 0; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.example-tags span { padding: 4px 6px; border: 1px solid #295b63; border-radius: 4px; background: #0a2831; color: #74ded8; font-size: 10px; }
.example-timeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  min-height: 60px;
  margin-top: 18px;
  padding-top: 7px;
  border-top: 1px solid #315868;
}
.example-timeline::before {
  content: "";
  position: absolute;
  top: -4px;
  right: 7%;
  left: 7%;
  height: 7px;
  background: radial-gradient(circle at 0 50%, #63f4e8 0 3px, transparent 4px), radial-gradient(circle at 33.33% 50%, #64c5ff 0 3px, transparent 4px), radial-gradient(circle at 66.66% 50%, #64c5ff 0 3px, transparent 4px), radial-gradient(circle at 100% 50%, #64c5ff 0 3px, transparent 4px);
}
.example-timeline span { display: flex; min-width: 0; flex-direction: column; gap: 2px; padding: 4px; border-right: 1px solid #152a36; color: #7f8d9e; font-size: 10px; }
.example-timeline span:last-child { border-right: 0; }
.example-timeline strong { color: #d5deea; font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 11px; font-weight: 500; }
.example-timeline .is-current { border: 1px solid #287f7d; border-radius: 6px; background: #071d26; color: #6fe7df; }
.example-timeline .is-current strong { color: #6fe7df; }
.example-excerpt { display: grid; grid-template-columns: 27px minmax(0, 1fr); gap: 8px; margin-top: 10px; padding: 9px 10px; border: 1px solid #253d4d; border-radius: 8px; background: #0c1d29; }
.quote-icon { color: #a9c4e8; font-family: Georgia, serif; font-size: 34px; line-height: .85; }
.excerpt-label { color: #7f8d9e; font-size: 10px; }
.example-excerpt p { margin: 2px 0 0; color: #b4bfcd; font-size: 11px; line-height: 1.38; }
.example-excerpt mark { padding: 1px 2px; background: #66e9e1; color: #062129; }
.example-link { display: inline-flex; margin-top: 8px; }
.trust-shield { display: grid; width: 30px; height: 34px; flex: none; place-items: center; color: #65e9e1; font-size: 17px; }
.home-scope { display: flex; align-items: center; gap: 12px; }

@media (max-width: 1380px) {
  .home-hero { grid-template-columns: minmax(0, 1.4fr) minmax(370px, .9fr); }
  .home-intro h1 { font-size: clamp(40px, 3.75vw, 50px); }
  .home-lede { font-size: 16px; }
  .home-network { left: -470px; }
}

@media (max-width: 1120px) {
  .home-hero { grid-template-columns: minmax(0, 1fr); gap: 26px; min-height: 0; padding-bottom: 38px; overflow: hidden; }
  .home-intro { width: 100%; padding-top: 36px; }
  .home-example { width: min(100%, 650px); margin: 0 auto; }
  .home-network { top: -170px; right: -180px; left: -200px; background-position: center 0; mask-image: linear-gradient(90deg, transparent, #000 20%, #000 85%, transparent); }
  .home-features { margin-top: 20px; }
}

@media (max-width: 850px) {
  .home-intro { padding-top: 32px; }
  .home-network { top: -138px; right: -120px; left: -120px; height: 315px; background-size: 875px 315px; opacity: .78; }
  .home-example { margin-top: 16px; }
}

@media (max-width: 600px) {
  .home-hero { gap: 22px; padding-bottom: 30px; }
  .home-hero::before {
    content: "";
    position: absolute;
    z-index: 0;
    top: 8px;
    right: -150px;
    left: 8%;
    height: 330px;
    opacity: .2;
    pointer-events: none;
    background: url('../images/home-master-intelligence-network.png') no-repeat 42% 0 / 920px 330px;
    mask-image: linear-gradient(90deg, transparent 0%, #000 24%, #000 100%), linear-gradient(180deg, #000 0%, #000 65%, transparent 100%);
    mask-composite: intersect;
  }
  .home-intro { padding-top: 28px; }
  .home-intro h1 { font-size: clamp(31px, 9vw, 39px); line-height: 1.02; }
  main.home-main .home-search .mode-tabs { display: grid; width: 100%; height: auto; grid-template-columns: 1fr 1fr; }
  main.home-main .home-search .mode-tab { min-width: 0; min-height: 44px; }
  .home-network { top: -102px; right: -52px; left: -52px; height: 220px; background-position: center top; background-size: 612px 220px; opacity: .66; mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, .75) 60%, transparent 100%); }
  .home-example { margin-top: 70px; padding: 10px; }
  .example-topline { align-items: start; }
  .example-topline-actions { flex-wrap: wrap; gap: 4px 8px; }
  .example-media { grid-template-columns: minmax(0, 1fr); }
  .example-thumbnail { aspect-ratio: 16 / 9; }
  .example-card { min-height: 0; }
  .example-timeline span { font-size: 9px; }
  .example-timeline strong { font-size: 10px; }
  .example-excerpt p { font-size: 10px; }
}

@media (max-width: 380px) {
  .home-network { right: -35px; left: -35px; }
  .example-timeline { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 5px; border-top: 0; }
  .example-timeline::before { display: none; }
  .example-timeline span { border: 1px solid #1b3340; border-radius: 5px; }
}
