:root {
  --paper: #f7f7f8;
  --ink: #23252a;
  --brand-text: #a9361c;
  --brand-fill: linear-gradient(110deg, #c72532, #d13d22 55%, #c64b12);
}
.mast {
  color: white;
  border: 0;
  background: linear-gradient(107deg, #c42a30 0%, #df3923 52%, #e8631d 100%);
}
.mast-in, main, footer { width: min(1320px, calc(100% - 8vw)); }
.mast-in { min-height: 68px; }
.mast .brand { letter-spacing: .035em; font-weight: 760; }
.mast .brand img { filter: drop-shadow(0 2px 3px #80241636); }
.head-divider { background: #ffffff55; }
.desktop-nav { height: 68px; }
.desktop-nav a { color: #fff4f1; }
.desktop-nav a.active { color: white; }
.desktop-nav a.active::after { background: white; inset-inline: 10px; }
.mast .search-launch, .mast .source-launch {
  background: #ffffffec;
  border: 1px solid #fffb;
  color: #84381e;
}
.mast .search-launch { min-height: 39px; border-radius: 24px; padding: 7px 14px; gap: 8px; }
.mast .search-launch kbd { color: #90482e; border-color: #efdad4; }
.mast .source-launch { border-radius: 50%; background: transparent; color: white; border-color: #ffffff80; }
.mast :focus-visible { outline-color: white; }
main { padding-top: 24px; }
.market-hero {
  isolation: isolate;
  position: relative;
  display: flex;
  align-items: center;
  min-height: clamp(218px, 19vw, 275px);
  border-radius: 18px;
  overflow: hidden;
  background: #f8ecdb url("./assets/shanghai-market.webp") center 58% / cover no-repeat;
  box-shadow: inset 0 0 0 1px #33281912;
}
.market-hero::before {
  content: "";
  z-index: -1;
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #fff5e9f5, #fff3e8d9 27%, #fff3e638 51%, transparent 68%);
}
.hero-content { padding: 25px clamp(24px, 3vw, 45px); }
.hero-date {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #81412c;
  font: 600 13px/1.4 var(--sans);
  font-variant-numeric: tabular-nums;
}
.hero-date .ic { width: 16px; height: 16px; }
.stock-sample-date { margin: 0 18px 10px; color: var(--muted); font-size: .875rem; }
.hero-content h1 {
  color: #281e1c;
  font-size: clamp(34px, 3.6vw, 53px);
  font-weight: 780;
  letter-spacing: -.045em;
  line-height: 1.18;
  margin: 9px 0 7px;
}
.hero-summary { color: #654e45; font-size: 16px; }
.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 39px;
  margin-top: 16px;
  padding: 8px 17px;
  color: white;
  border-radius: 9px;
  background: var(--brand-fill);
  font-size: 14px;
  font-weight: 650;
  box-shadow: 0 3px 7px #a4351c24;
}
.hero-cta:hover, .quick-link:hover .quick-icon { filter: brightness(1.07); }
.quick-grid {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 1px;
  margin: 14px 0 23px;
  background: #ece9e6;
  border: 1px solid #ece9e6;
  border-radius: 13px;
  overflow: hidden;
}
.quick-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  min-height: 75px;
  background: white;
  padding: 9px;
  font-size: 15px;
  font-weight: 650;
}
.quick-link:hover { background: #fff9f2; }
.quick-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  color: white;
  background: linear-gradient(140deg, #c92f35 5%, #f0582d 58%, #ed791c);
}
.quick-stocks .quick-icon, .quick-quotes .quick-icon { background: linear-gradient(140deg, #d53b29, #ef7527); }
.quick-sectors .quick-icon { background: linear-gradient(140deg, #d94b26, #eb822c); }
.quick-backtest .quick-icon { background: linear-gradient(140deg, #cc3526, #f06c36); }
.quick-icon .ic { width: 20px; height: 20px; stroke-width: 1.85; }
.quick-link:focus-visible { outline-offset: -3px; }
.market-section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.market-section-head h2 { font-size: 21px; font-weight: 730; letter-spacing: -.035em; }
.market-section-head .text-btn { color: var(--brand-text); }
.mobile-nav { padding-bottom: max(6px, env(safe-area-inset-bottom)); }
.mobile-nav a.active { color: #ad360e; }
.mobile-nav a.active .ic { stroke-width: 2.3; }
footer { margin: 17px auto 0; }
@media (max-width: 900px) and (min-width: 781px) {
  .mast-in { gap: 13px; }
  .desktop-nav { gap: 11px; }
  .desktop-nav a { font-size: 14px; }
  .search-launch > span:nth-child(2) { display: none; }
}
@media (max-width: 780px) {
  .mast-in, main, footer { width: calc(100% - 24px); }
  .mast-in { min-height: 58px; gap: 10px; }
  .head-actions { gap: 8px; }
  .brand { font-size: 20px; }
  .mast .search-launch { font-size: 12px; min-height: 34px; padding: 6px 10px; }
  .mast .source-launch { width: 34px; height: 34px; }
  main { padding-top: 12px; }
  .market-hero { min-height: 180px; border-radius: 13px; background-position: 62% 50%; }
  .market-hero::before { background: linear-gradient(90deg, #fff4e9f5 0%, #fff0dfdd 31%, #fff0dc43 60%, transparent 83%); }
  .hero-content { padding: 16px; }
  .hero-content h1 { font-size: clamp(28px, 7vw, 36px); margin: 8px 0 5px; }
  .hero-summary { font-size: 13px; }
  .hero-date { font-size: 11px; gap: 4px; }
  .hero-date .ic { width: 13px; height: 13px; }
  .hero-cta { min-height: 34px; font-size: 13px; padding: 6px 10px; margin-top: 12px; }
  .hero-cta .ic { width: 16px; }
  .quick-grid { gap: 0; margin: 9px 0 16px; background: white; }
  .quick-link { min-height: 76px; flex-direction: column; gap: 5px; padding: 6px 1px; font-size: 12px; white-space: nowrap; }
  .quick-icon { width: 31px; height: 31px; border-radius: 9px; }
  .quick-icon .ic { width: 18px; height: 18px; }
  .market-section-head { margin-bottom: 9px; }
  .market-section-head h2 { font-size: 18px; }
  footer { margin-bottom: 65px; }
  .mobile-nav { grid-auto-columns: minmax(0,1fr); grid-auto-flow: column; grid-template-columns: none; }
}
@media (max-width: 355px) {
  .mast .search-launch > span:nth-child(2) { display: none; }
  .hero-content { padding: 14px; }
}
