/*
 * Index-aligned workspace pages.
 * Loaded after site-tech.css so data, research, delivery and archive pages
 * share the same canvas, typography and spacing rhythm as index.html.
 */

html:has(body.index-aligned-page),
body.index-aligned-page,
body.index-aligned-page > .layout,
body.index-aligned-page .sidebar,
body.index-aligned-page .main-area,
body.index-aligned-page .main-area > .content {
  background-color: #f3f7fb !important;
  background-image: none !important;
}

body.index-aligned-page,
body.index-aligned-page button,
body.index-aligned-page input,
body.index-aligned-page select,
body.index-aligned-page textarea {
  font-family: Inter, "PingFang SC", "Noto Sans SC", "Microsoft YaHei UI", system-ui, -apple-system, sans-serif !important;
}

body.index-aligned-page::before,
body.index-aligned-page::after,
body.index-aligned-page > .layout::before,
body.index-aligned-page > .layout::after,
body.index-aligned-page .main-area::before,
body.index-aligned-page .main-area::after,
body.index-aligned-page .main-area > .content::before,
body.index-aligned-page .main-area > .content::after {
  display: none !important;
  content: none !important;
}

body.index-aligned-page .sidebar {
  border-right: 1px solid #d9e4ef !important;
  box-shadow: none !important;
}

body.index-aligned-page .main-area > .topbar {
  border: 1px solid #d9e4ef !important;
  background: rgba(243, 247, 251, 0.96) !important;
  box-shadow: none !important;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

body.index-aligned-page .main-area > .content,
body.index-aligned-page.workspace-feature-notify .main-area > .content,
body.index-aligned-page.workspace-feature-history .main-area > .content {
  width: min(1440px, calc(100% - 48px)) !important;
  margin: 0 auto !important;
  padding: 24px 0 44px !important;
  gap: 16px !important;
}

body.index-aligned-page .page-title {
  color: #071b33 !important;
  font-size: 18px !important;
  font-weight: 850 !important;
  line-height: 1.18 !important;
  letter-spacing: -0.02em !important;
}

body.index-aligned-page .subnav,
body.index-aligned-page .hs-tabs {
  gap: 26px !important;
  margin: 0 0 16px !important;
  padding: 0 4px !important;
  border: 0 !important;
  border-bottom: 1px solid #d9e4ef !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.index-aligned-page .hs-tab {
  position: relative;
  min-height: 50px !important;
  padding: 0 2px !important;
  border: 0 !important;
  border-radius: 0 !important;
  color: #334d68 !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 15px !important;
  font-weight: 800 !important;
  transition: color 180ms ease !important;
}

body.index-aligned-page .hs-tab::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: transparent;
  content: "";
}

body.index-aligned-page .hs-tab:hover { color: #1769e0 !important; }
body.index-aligned-page .hs-tab:active { transform: translateY(1px); }
body.index-aligned-page .hs-tab:focus-visible { border-radius: 5px !important; }
body.index-aligned-page .hs-tab.active { color: #071b33 !important; }
body.index-aligned-page .hs-tab.active::after {
  background: linear-gradient(90deg, #1769e0, #087f95);
}

body.index-aligned-page .workspace-page-intro,
body.index-aligned-page .board-page-head,
body.index-aligned-page .notify-hero,
body.index-aligned-page .workspace-content-head {
  display: block !important;
  min-height: 0 !important;
  margin: 0 0 16px !important;
  padding: 14px 4px 20px !important;
  border: 0 !important;
  border-bottom: 1px solid #d9e4ef !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

body.index-aligned-page .board-page-head {
  display: flex !important;
  align-items: flex-end !important;
}

body.index-aligned-page .workspace-page-kicker,
body.index-aligned-page .board-page-kicker,
body.index-aligned-page .workspace-content-head > span {
  display: block;
  margin: 0 0 8px !important;
  color: #1769e0 !important;
  font-size: 10px !important;
  font-weight: 850 !important;
  line-height: 1.2 !important;
  letter-spacing: 0.15em !important;
}

body.index-aligned-page .workspace-page-intro h1,
body.index-aligned-page .board-page-copy h1,
body.index-aligned-page .notify-hero h1,
body.index-aligned-page .workspace-content-head h1 {
  margin: 0 !important;
  color: #071b33 !important;
  font-size: clamp(28px, 2.25vw, 34px) !important;
  font-weight: 850 !important;
  line-height: 1.16 !important;
  letter-spacing: -0.045em !important;
  text-wrap: balance;
}

body.index-aligned-page .workspace-page-intro p,
body.index-aligned-page .board-page-copy p,
body.index-aligned-page .notify-hero p,
body.index-aligned-page .workspace-content-head p {
  max-width: 760px !important;
  margin: 9px 0 0 !important;
  padding: 0 !important;
  border: 0 !important;
  color: #5d7188 !important;
  background: transparent !important;
  font-size: 13px !important;
  line-height: 1.72 !important;
  text-wrap: pretty;
}

body.index-aligned-page .workspace-page-intro p::before,
body.index-aligned-page .notify-hero::before { display: none !important; content: none !important; }

body.index-aligned-page :is(
  .panel,
  .idx,
  .kpi,
  .bi-card,
  .channel-card,
  .guide,
  .hist-item,
  .mine-hero,
  .mine-box,
  .mine-card,
  .sec-card,
  .agent-card,
  .source-link-card,
  .win-card,
  .window-lite,
  .top-pick-list,
  .feed-head,
  .sm-head,
  .gd-head,
  .hs-summary
) {
  border: 1px solid #e3e9f0 !important;
  background-color: #fff !important;
  box-shadow: 0 8px 24px rgba(25, 55, 90, 0.055) !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

body.index-aligned-page :is(.panel, .channel-card, .guide, .mine-hero, .mine-box, .top-pick-list) {
  border-radius: 16px !important;
}

body.index-aligned-page :is(.idx, .kpi, .bi-card, .hist-item, .mine-card, .sec-card, .agent-card, .source-link-card, .win-card, .window-lite) {
  border-radius: 14px !important;
}

body.index-aligned-page :is(.panel, .idx, .kpi, .channel-card, .hist-item, .mine-card, .sec-card, .win-card) {
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease !important;
}

body.index-aligned-page :is(.panel, .idx, .kpi, .channel-card, .hist-item, .mine-card, .sec-card, .win-card):hover {
  border-color: #cdd9e5 !important;
  box-shadow: 0 12px 30px rgba(25, 55, 90, 0.075) !important;
}

body.index-aligned-page :is(.idx, .hist-item):hover { transform: translateY(-1px) !important; }

body.index-aligned-page :is(.panel-h h3, .intra-h h3, .channel-title, .guide h2, .hist-top b, .hs-h) {
  color: #071b33 !important;
  font-weight: 800 !important;
  letter-spacing: -0.025em !important;
}

body.index-aligned-page :is(.idx .px, .kpi b, .feed-stat b, .stk-score, .q-stat b) {
  font-variant-numeric: tabular-nums;
}

/* Today's market dashboard */
body.index-aligned-page.workspace-feature-board .td-head .meta {
  border: 1px solid #d9e4ef !important;
  background: rgba(255, 255, 255, 0.72) !important;
}

body.index-aligned-page.workspace-feature-board .idx-strip,
body.index-aligned-page.workspace-feature-board .kpi-row { gap: 12px !important; margin-bottom: 18px !important; }

body.index-aligned-page.workspace-feature-board .idx,
body.index-aligned-page.workspace-feature-board .kpi { padding: 16px !important; }

body.index-aligned-page.workspace-feature-board .panel { padding: 22px !important; }
body.index-aligned-page.workspace-feature-board .panel-2col,
body.index-aligned-page.workspace-feature-board .bi-grid { gap: 18px !important; }

body.index-aligned-page.workspace-feature-board .ladder-panel .zt,
body.index-aligned-page.workspace-feature-board .zt-card {
  border: 1px solid #e5ebf2 !important;
  background: #f7f9fc !important;
}

/* AI research */
body.index-aligned-page.workspace-feature-mine .mine-page-head { margin-top: -2px !important; }

body.index-aligned-page.workspace-feature-mine .feed-head,
body.index-aligned-page.workspace-feature-mine .sm-head,
body.index-aligned-page.workspace-feature-mine .gd-head {
  padding: 14px 16px !important;
  border-radius: 14px !important;
}

body.index-aligned-page.workspace-feature-mine .feed-filters,
body.index-aligned-page.workspace-feature-mine .feed-watch {
  border-color: #d9e4ef !important;
  background: rgba(255, 255, 255, 0.82) !important;
}

body.index-aligned-page.workspace-feature-mine .feed-item,
body.index-aligned-page.workspace-feature-mine .feed-ai {
  border-color: #e3e9f0 !important;
  border-radius: 14px !important;
  box-shadow: 0 6px 18px rgba(25, 55, 90, 0.045) !important;
}

body.index-aligned-page.workspace-feature-mine .feed-item { background: #fff !important; }
body.index-aligned-page.workspace-feature-mine .feed-ai {
  border-color: #cbdcf6 !important;
  background: linear-gradient(135deg, #edf4ff 0%, #f7faff 100%) !important;
}

body.index-aligned-page.workspace-feature-mine #panel:has(> .mine-hero) {
  border: 1px solid #cbdcf6 !important;
  background: linear-gradient(135deg, #edf4ff 0%, #f7faff 100%) !important;
  box-shadow: 0 10px 28px rgba(43, 102, 246, 0.07) !important;
}

/* Stock-research landing: one quiet container, no nested card outlines. */
body.index-aligned-page.workspace-feature-mine .mine-landing .mine-search {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}

body.index-aligned-page.workspace-feature-mine .mine-landing .mine-hint {
  margin-top: 2px !important;
  padding: 14px 0 0 !important;
  border: 0 !important;
  border-top: 1px solid #e7edf4 !important;
  background: transparent !important;
}

body.index-aligned-page.workspace-feature-mine .watch-toggle {
  min-height: 38px;
  padding: 0 16px !important;
  border: 1px solid #b8c8dc !important;
  border-radius: 9px !important;
  color: #3f5872 !important;
  background: #fff !important;
}

body.index-aligned-page.workspace-feature-mine .watch-toggle.on {
  border-color: #216fe0 !important;
  color: #fff !important;
  background: #216fe0 !important;
  box-shadow: 0 5px 14px rgba(33, 111, 224, 0.18) !important;
}

body.index-aligned-page.workspace-feature-mine .watch-entry {
  display: inline-flex;
  min-width: 280px;
  min-height: 38px;
  overflow: hidden;
  border: 1px solid #b8c8dc;
  border-radius: 9px;
  background: #fff;
}

body.index-aligned-page.workspace-feature-mine .watch-add {
  width: 220px !important;
  min-width: 0;
  padding: 0 12px !important;
  border: 0 !important;
  border-radius: 0 !important;
  color: #18324d;
  background: transparent !important;
}

body.index-aligned-page.workspace-feature-mine .watch-add:focus {
  box-shadow: inset 0 0 0 2px rgba(33, 111, 224, 0.22);
}

body.index-aligned-page.workspace-feature-mine .watch-add-btn {
  min-width: 60px;
  border: 0;
  border-left: 1px solid #cbd7e5;
  color: #176ee0;
  background: #f2f7ff;
  font-weight: 800;
  cursor: pointer;
}

body.index-aligned-page.workspace-feature-mine .watch-add-btn:hover {
  color: #fff;
  background: #216fe0;
}

/* Notifications */
body.index-aligned-page.workspace-feature-notify .channel-grid { gap: 18px !important; margin-bottom: 18px !important; }

body.index-aligned-page.workspace-feature-notify .channel-card {
  padding: 20px !important;
}

body.index-aligned-page.workspace-feature-notify .channel-card .channel-head {
  margin: -20px -20px 18px !important;
  padding: 16px 20px !important;
  border-bottom: 1px solid #e3e9f0 !important;
  background: #f8faff !important;
  border-radius: 15px 15px 0 0;
}

body.index-aligned-page.workspace-feature-notify .field { margin-bottom: 14px !important; }

body.index-aligned-page.workspace-feature-notify :is(.field input[type="text"], .field input[type="url"]) {
  min-height: 44px !important;
  padding: 10px 12px !important;
  border: 1px solid #d5e0eb !important;
  border-radius: 10px !important;
  background: #fff !important;
}

body.index-aligned-page.workspace-feature-notify .rule-box,
body.index-aligned-page.workspace-feature-notify .guide-col {
  border: 1px solid #e3e9f0 !important;
  background: #f7f9fc !important;
}

body.index-aligned-page.workspace-feature-notify .rule-box { margin: 14px 0 !important; padding: 14px !important; }
body.index-aligned-page.workspace-feature-notify .guide { padding: 22px !important; }
body.index-aligned-page.workspace-feature-notify .guide-grid { gap: 14px !important; }
body.index-aligned-page.workspace-feature-notify .guide-col { padding: 16px !important; }

/* History */
body.index-aligned-page.workspace-feature-history #list { flex: 0 0 auto !important; }

body.index-aligned-page.workspace-feature-history .hist-list { gap: 12px !important; }

body.index-aligned-page.workspace-feature-history .hist-item {
  position: relative;
  padding: 16px 18px !important;
  overflow: hidden;
}

body.index-aligned-page.workspace-feature-history .hist-item::before {
  position: absolute;
  top: 14px;
  bottom: 14px;
  left: 0;
  width: 3px !important;
  border-radius: 0 3px 3px 0;
  background: #7aaeff;
  content: "";
}

body.index-aligned-page.workspace-feature-history .hist-meta { margin-top: 6px !important; line-height: 1.55; }

body.index-aligned-page.workspace-feature-history #list:has(> .muted) {
  min-height: 240px;
  border: 1px dashed #cbd8e5;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.56);
}

@media (max-width: 900px) {
  body.index-aligned-page .board-page-head {
    align-items: flex-start !important;
    flex-direction: column !important;
    gap: 12px !important;
  }

  body.index-aligned-page.workspace-feature-notify .channel-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  body.index-aligned-page .main-area > .content,
  body.index-aligned-page.workspace-feature-notify .main-area > .content,
  body.index-aligned-page.workspace-feature-history .main-area > .content {
    width: calc(100% - 20px) !important;
    padding-top: 16px !important;
  }

  body.index-aligned-page .workspace-page-intro,
  body.index-aligned-page .board-page-head,
  body.index-aligned-page .notify-hero,
  body.index-aligned-page .workspace-content-head { padding-inline: 2px !important; }

  body.index-aligned-page .workspace-page-intro h1,
  body.index-aligned-page .board-page-copy h1,
  body.index-aligned-page .notify-hero h1,
  body.index-aligned-page .workspace-content-head h1 { font-size: 27px !important; }
}

@media (prefers-reduced-motion: reduce) {
  body.index-aligned-page *,
  body.index-aligned-page *::before,
  body.index-aligned-page *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
