/* Front page. A lead photo when /news/latest.json has one, otherwise the chart cover, then three doors. */

.story-hero { margin: 0; }
.story-hero img {
  display: block;
  width: 100%;
  height: min(62vh, 560px);
  min-height: 280px;
  object-fit: cover;
  object-position: center;
  background: #111;
}
.story-hero .hero-credit {
  max-width: var(--container);
  margin: 0 auto;
  padding: 10px 20px 0;
  font-size: 13px;
  line-height: 1.45;
  color: #222;
}
.story-hero .hero-credit a {
  color: #222;
  text-decoration: underline;
  text-underline-offset: 2px;
}
body.has-story-hero .cover {
  grid-template-columns: minmax(0, 1fr);
  padding-top: 18px;
}
body.has-story-hero .cover-rail { display: none; }
body.has-story-hero .dek a { color: inherit; text-decoration: none; }
body.has-story-hero .dek a:hover { text-decoration: underline; text-underline-offset: 3px; }

.tape { background: var(--bg-2); border-bottom: 1px solid var(--line); font-size: 12.5px; position: relative; }
.tape-in {
  display: flex; align-items: center; overflow-x: auto; white-space: nowrap;
  scrollbar-width: none; max-width: var(--container); margin: 0 auto; padding: 0 20px;
}
.tape-in::-webkit-scrollbar { display: none; }
.tape::after {
  content: ""; position: absolute; right: 0; top: 0; bottom: 0; width: 28px;
  background: linear-gradient(90deg, rgba(247,247,245,0), var(--bg-2)); pointer-events: none;
}
.tape .lbl {
  font-weight: 700; letter-spacing: 0.12em; font-size: 10.5px; color: var(--text);
  padding: 8px 12px 8px 0; margin-right: 4px; border-right: 1px solid var(--line-2);
}
.tk { display: inline-flex; align-items: baseline; gap: 6px; padding: 8px 14px; border-right: 1px solid var(--line); text-decoration: none; }
.tk:last-child { border-right: 0; padding-right: 32px; }
.tk b { font-weight: 600; color: var(--text-2); }
.tk .v { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-weight: 500; }
.tk .c { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-weight: 600; font-size: 12px; }

.cover {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: 56px;
  padding: 42px 20px 8px;
  align-items: start;
}
.cover .kicker { color: var(--text); }
.cover .kicker .sep { color: var(--faint); margin: 0 6px; }
.cover h1 {
  margin: 12px 0 18px;
  font-size: clamp(34px, 4.6vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 700;
}
.cover h1 a { text-decoration: none; }
.cover h1 a:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.dek {
  max-width: 38em;
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1.7;
  color: #1a1a1a;
}
.front-list { list-style: none; margin: 28px 0 0; padding: 0; border-top: 1px solid var(--line); }
.front-list li {
  display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 8px;
  padding: 13px 0; border-bottom: 1px solid var(--line);
  font-family: var(--font-display); font-size: 17px; line-height: 1.4;
}
.front-list .n { font-family: var(--font-mono); font-size: 12px; color: var(--muted); padding-top: 4px; }
.read { margin-top: 22px; }
.read a { color: var(--link); text-decoration: none; font-weight: 600; font-size: 14px; }
.read a:hover { text-decoration: underline; }

.cover-rail { border-left: 1px solid var(--line); padding-left: 32px; min-width: 0; }
.signal-card { margin: 0; }
.sc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.sc-title { font-family: var(--font-sans); font-size: 15px; font-weight: 650; }
.sc-name { font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 6px; }
.sc-price { text-align: right; }
.sc-price #sc-last { display: block; font-size: 18px; font-weight: 600; }
.sc-chg { font-size: 12px; }
.sc-chips { margin-top: 10px; }
.sc-chart { height: 248px; margin-top: 4px; }
.sc-chart svg { width: 100%; height: 100%; overflow: visible; }
.sc-chart .grid line { stroke: var(--line); }
.sc-chart .axis text { fill: var(--faint); font: 500 10px var(--font-mono); }
.sc-chart .mk { font: 700 10px var(--font-mono); text-anchor: middle; }
.sc-chart .mk-count { font-weight: 500; font-size: 8.5px; opacity: 0.5; }
.sc-chart .last-line { stroke-dasharray: 2 3; }
.sc-foot { margin-top: 6px; font-size: 11px; color: var(--faint); }

.mkt { width: 100%; border-collapse: collapse; margin-top: 18px; font-size: 13.5px; }
.mkt td { padding: 7px 0; border-bottom: 1px solid var(--line); vertical-align: baseline; }
.mkt td.n { font-weight: 500; color: var(--text-2); }
.mkt td.v { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-weight: 500; padding-left: 8px; white-space: nowrap; }
.mkt td.c { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-weight: 600; width: 76px; white-space: nowrap; padding-left: 8px; }

.doors {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  margin: 56px auto 12px;
  border-top: 3px solid #000;
}
.door {
  display: flex; flex-direction: column; gap: 8px; min-height: 220px; height: 100%;
  padding: 22px 28px 28px 0; text-decoration: none;
  border-right: 1px solid var(--line);
}
.door:last-child { border-right: 0; padding-right: 0; }
.door + .door { padding-left: 28px; }
.door .ey { font-size: 10.5px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.door h2 { font-size: clamp(26px, 2.4vw, 34px); letter-spacing: -0.015em; }
.door h2 .zh { display: block; margin-top: 4px; font-size: 15px; font-weight: 600; color: var(--muted); letter-spacing: 0.04em; }
.door p { color: var(--text-2); font-size: 14.5px; line-height: 1.55; max-width: 34em; }
.door .go { margin-top: auto; padding-top: 16px; font-size: 13px; font-weight: 600; }
.door:hover h2 { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.door-photo {
  display: flex; align-items: center; gap: 12px; margin-top: 8px; min-height: 70px;
}
.door-photo picture { display: block; flex: 0 0 auto; }
.door-photo > div { min-width: 0; }
.door-photo img {
  display: block; width: 56px; height: 70px; object-fit: cover; background: var(--bg-2);
  filter: grayscale(1); transition: filter 0.2s ease;
}
.door:hover .door-photo img { filter: none; }
.door-photo b {
  display: block; font-size: 14px; line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.door-photo span {
  display: block; font-family: var(--font-mono); font-size: 12px; line-height: 1.3;
  color: var(--text-2); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.door-photo span.up { color: var(--up); }
.door-photo span.down { color: var(--down); }

@media (max-width: 960px) {
  .cover { grid-template-columns: 1fr; gap: 32px; padding-top: 28px; }
  .cover-rail { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 24px; }
  .doors { grid-template-columns: 1fr; }
  .door, .door + .door { border-right: 0; padding: 20px 0; border-bottom: 1px solid var(--line); }
  .door:last-child { border-bottom-color: transparent; }
}
@media (max-width: 600px) {
  .tape-in { padding: 0 16px; }
  .cover { padding-left: 16px; padding-right: 16px; }
  .story-hero img { height: 240px; min-height: 200px; }
  .story-hero .hero-credit { padding-left: 16px; padding-right: 16px; }
  .cover h1 { font-size: 30px; }
  .dek, .front-list li { font-size: 16px; }
  .sc-chart { height: 200px; }
}
