/**
 * /news/ list page content (Lite Shell provides chrome)
 * Visual: flat cards, Toket purple accent, minimal shadow (aligned with Home / Pricing / Login)
 */

/* Hub UI: single locale — no zh/en span stacking */
html[lang="en"] .news-lite-doc .v2-i18n-zh,
html.lang-en .news-lite-doc .v2-i18n-zh {
  display: none !important;
}

html[lang="en"] .news-lite-doc .v2-i18n-en,
html.lang-en .news-lite-doc .v2-i18n-en {
  display: inline !important;
}

html:not([lang="en"]) .news-lite-doc .v2-i18n-en {
  display: none !important;
}

html:not([lang="en"]) .news-lite-doc .v2-i18n-zh {
  display: inline;
}

/* Scoped tokens — bridge to design-tokens.css (--toket-*) */
body.news-lite-doc .news-lite {
  --news-accent: var(--toket-brand, var(--primary, #635bff));
  --news-accent-2: var(--toket-brand-2, var(--primary-2, #7c6cff));
  --news-surface: var(--toket-card-bg, var(--card-bg));
  --news-border: color-mix(in srgb, var(--line) 88%, transparent);
  --news-border-strong: color-mix(in srgb, var(--news-accent) 22%, var(--line));
  --news-radius-panel: var(--toket-radius-panel, 14px);
  --news-radius-control: var(--toket-radius-control, 12px);
  --news-radius-pill: var(--toket-radius-pill, 999px);
  --news-transition: var(--toket-transition-ui, 0.15s ease);
}

.news-lite .wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 clamp(16px, 2.5vw, 24px);
}

/* —— Hero —— */
.news-lite .hero {
  padding: clamp(22px, 3vw, 36px) 0 clamp(12px, 1.8vw, 18px);
  text-align: center;
}

.news-lite .hero__badge {
  display: inline-block;
  padding: 4px 12px;
  margin-bottom: 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--news-accent-2);
  background: color-mix(in srgb, var(--news-accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--news-accent) 26%, transparent);
  border-radius: var(--news-radius-pill);
}

.news-lite .hero h1 {
  margin: 0 auto 8px;
  max-width: 34rem;
  font-size: clamp(1.75rem, 3.8vw, 2.375rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.15;
  color: var(--text-main);
}

.news-lite .hero p {
  margin: 0 auto;
  max-width: 42rem;
  font-size: clamp(0.9375rem, 1.6vw, 1.0625rem);
  color: var(--text-sub);
  line-height: 1.6;
}

.news-lite .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* —— Hub strip: compact category tabs —— */
.news-lite-hub-strip {
  padding: 0 0 clamp(8px, 1.5vw, 14px);
}

.news-lite-hub-strip__inner {
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 1.5vw, 14px);
}

.news-lite-toolbar-panel {
  padding: 0;
}

.news-lite-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 6px;
  margin-top: 0;
}

.news-lite-tab {
  border: 1px solid var(--news-border);
  background: color-mix(in srgb, var(--news-surface) 94%, var(--text-main));
  color: var(--text-sub);
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 6px 13px;
  border-radius: var(--news-radius-pill);
  cursor: pointer;
  box-shadow: none;
  transition:
    border-color var(--news-transition),
    background var(--news-transition),
    color var(--news-transition);
}

.news-lite-tab:hover {
  border-color: color-mix(in srgb, var(--news-accent) 28%, var(--line));
  color: var(--text-main);
  background: color-mix(in srgb, var(--news-accent) 5%, var(--news-surface));
}

.news-lite-tab.is-active {
  background: color-mix(in srgb, var(--news-accent) 10%, var(--news-surface));
  border-color: color-mix(in srgb, var(--news-accent) 32%, var(--line));
  color: var(--news-accent);
}

.news-lite-tools-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  margin-top: clamp(18px, 2.5vw, 28px);
  padding: clamp(14px, 2vw, 16px);
  text-align: left;
  background: color-mix(in srgb, var(--news-accent) 3%, var(--news-surface));
  border: 1px solid color-mix(in srgb, var(--news-accent) 14%, var(--news-border));
  border-radius: var(--news-radius-panel);
  box-shadow: none;
}

.news-lite-tools-cta__lead {
  margin: 0;
  flex: 1 1 12rem;
  min-width: 0;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--text-sub);
}

.news-lite-tools-cta__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 0 0 auto;
}

.news-lite-tools-cta__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 6px 14px;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--news-accent);
  text-decoration: none;
  white-space: nowrap;
  background: color-mix(in srgb, var(--news-accent) 6%, var(--news-surface));
  border: 1px solid color-mix(in srgb, var(--news-accent) 22%, var(--line));
  border-radius: var(--news-radius-pill);
  box-shadow: none;
  transition:
    border-color var(--news-transition),
    background var(--news-transition),
    color var(--news-transition);
}

.news-lite-tools-cta__link:hover {
  text-decoration: none;
  color: var(--news-accent);
  background: color-mix(in srgb, var(--news-accent) 11%, var(--news-surface));
  border-color: color-mix(in srgb, var(--news-accent) 36%, var(--line));
}

/* —— Section blocks —— */
.news-lite-block {
  margin-bottom: clamp(18px, 2.4vw, 26px);
}

.news-lite-block:last-of-type {
  margin-bottom: 0;
}

.news-lite-block + .news-lite-block {
  padding-top: clamp(16px, 2vw, 22px);
  border-top: 1px solid var(--news-border);
}

.news-lite-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 clamp(12px, 1.5vw, 16px);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--news-border);
  font-size: 1.0625rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.news-lite-section-title::before {
  content: "";
  flex: 0 0 3px;
  width: 3px;
  height: 1em;
  border-radius: 2px;
  background: var(--news-accent);
}

.news-lite-empty {
  margin: 8px 0 0;
  padding: 20px 16px;
  text-align: center;
  font-size: 0.9375rem;
  color: var(--text-sub);
  border: 1px dashed var(--news-border);
  border-radius: var(--news-radius-panel);
  background: color-mix(in srgb, var(--news-surface) 72%, transparent);
  box-shadow: none;
}

.news-lite-block[hidden],
.news-lite-empty[hidden],
.news-lite-load-more-wrap[hidden] {
  display: none !important;
}

.news-lite-load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: clamp(20px, 3vw, 28px);
}

.news-lite-load-more {
  min-height: 40px;
  padding: 8px 20px;
  color: var(--news-accent);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 650;
  background: var(--news-surface);
  border: 1px solid color-mix(in srgb, var(--news-accent) 28%, var(--news-border));
  border-radius: var(--news-radius-pill);
  cursor: pointer;
}

.news-lite-load-more:hover {
  background: color-mix(in srgb, var(--news-accent) 6%, var(--news-surface));
  border-color: color-mix(in srgb, var(--news-accent) 42%, var(--news-border));
}

.news-not-found__lead {
  color: var(--text-sub, #64748b);
  line-height: 1.65;
  margin: 0 0 20px;
}

.news-lite .news-card[hidden] {
  display: none !important;
}

/* —— Featured grid + text-first latest list —— */
.news-lite .cards-section {
  padding: clamp(6px, 1vw, 10px) 0 clamp(32px, 4vw, 44px);
}

.news-lite .cards-grid--featured {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(12px, 1.5vw, 16px);
  align-items: stretch;
}

.news-lite .news-latest-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

@media (min-width: 640px) {
  .news-lite .cards-grid--featured {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 960px) {
  .news-lite .cards-grid--featured {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .news-lite-hub-strip__inner {
    gap: 16px;
  }
}

/* —— Shared article card structure —— */
.news-lite .news-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 168px;
  overflow: hidden;
  background: var(--news-surface);
  border: 1px solid var(--news-border);
  border-radius: var(--news-radius-panel);
  text-decoration: none;
  color: inherit;
  box-shadow: none;
  transition:
    border-color var(--news-transition),
    background var(--news-transition),
    transform var(--news-transition);
}

.news-lite .news-card__cover {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: color-mix(in srgb, var(--news-border) 35%, var(--news-surface));
}

.news-lite .news-card__cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-lite .news-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  padding: clamp(16px, 2vw, 20px) clamp(16px, 2vw, 18px) clamp(14px, 1.8vw, 18px);
}

.news-lite .news-card:hover {
  border-color: color-mix(in srgb, var(--news-accent) 38%, var(--line));
  background: color-mix(in srgb, var(--news-accent) 3%, var(--news-surface));
  box-shadow: none;
  transform: translateY(-1px);
  text-decoration: none;
}

.news-lite .news-card__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 0.75rem;
  color: var(--text-sub);
  font-weight: 500;
}

.news-lite .news-card__tag {
  padding: 2px 9px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: color-mix(in srgb, var(--news-accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--news-accent) 22%, transparent);
  border-radius: var(--news-radius-pill);
  color: var(--news-accent-2);
}

.news-lite .news-card__signals {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 5px;
}

.news-lite .news-card__signal + .news-card__signal::before {
  content: "·";
  margin-right: 5px;
  color: var(--news-border);
}

.news-lite .news-card h2 {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.38;
  color: var(--text-main);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  min-height: calc(1.38em * 2);
}

.news-lite .news-card p {
  margin: 0;
  flex: 1;
  font-size: 0.875rem;
  color: var(--text-sub);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.news-lite .news-card--latest {
  min-height: 0;
  background: color-mix(in srgb, var(--news-surface) 92%, transparent);
  border: 1px solid color-mix(in srgb, var(--news-border) 88%, transparent);
  border-radius: calc(var(--news-radius-panel) - 2px);
}

.news-lite .news-card--latest .news-card__body {
  padding: clamp(14px, 2vw, 16px);
}

.news-lite .news-card--latest:last-child {
  border-bottom-color: color-mix(in srgb, var(--news-border) 88%, transparent);
}

/* Featured without a cover becomes a compact editorial text row. */
.news-lite .news-card--featured:not(.news-card--has-cover) {
  min-height: 0;
  background: transparent;
  border: 0;
  border-left: 2px solid color-mix(in srgb, var(--news-accent) 34%, var(--news-border));
  border-radius: 0;
}

.news-lite .news-card--featured:not(.news-card--has-cover) .news-card__body {
  padding: 10px 14px 12px;
}

.news-lite .news-card--featured:not(.news-card--has-cover):hover {
  background: color-mix(in srgb, var(--news-accent) 3%, transparent);
  border-left-color: var(--news-accent);
  transform: none;
}

.news-lite .news-card--featured:not(.news-card--has-cover) h2 {
  min-height: 0;
}

.news-lite .news-card--featured:not(.news-card--has-cover) .news-card__read {
  margin-top: 10px;
}

.news-lite .news-card--latest:hover {
  background: color-mix(in srgb, var(--news-accent) 3%, var(--news-surface));
  border-color: color-mix(in srgb, var(--news-accent) 24%, var(--news-border));
  transform: none;
}

.news-lite .news-card--latest .news-card__meta {
  gap: 5px;
  margin-bottom: 7px;
}

.news-lite .news-card--latest .news-card__tag {
  padding: 0;
  font-size: 0.75rem;
  letter-spacing: 0;
  color: var(--news-accent);
  background: transparent;
  border: 0;
}

.news-lite .news-card--latest .news-card__tag::after {
  content: "·";
  margin-left: 5px;
  color: var(--news-border);
}

.news-lite .news-card--latest h2 {
  min-height: 0;
  margin-bottom: 6px;
  font-size: clamp(1.0625rem, 1.8vw, 1.1875rem);
}

.news-lite .news-card--latest .news-card__read {
  margin-top: 10px;
}

.news-lite .news-card__read {
  margin-top: 14px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--news-accent);
}

@media (max-width: 640px) {
  .news-lite .hero {
    padding: 20px 0 10px;
  }

  .news-lite-hub-strip {
    padding-bottom: 8px;
  }

  .news-lite-toolbar-panel {
    padding: 0;
  }

  .news-lite-tools-cta {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-top: 18px;
    padding: 14px;
  }

  .news-lite-tools-cta__lead {
    flex: 0 1 auto;
    font-size: 0.875rem;
    line-height: 1.5;
  }

  .news-lite-tools-cta__actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .news-lite-tools-cta__link {
    width: 100%;
    min-height: 44px;
    white-space: normal;
  }

  .news-lite .cards-section {
    padding-bottom: 32px;
  }

  .news-lite-block + .news-lite-block {
    padding-top: 16px;
  }

  .news-lite .news-card {
    min-height: 0;
    transform: none;
  }

  .news-lite .news-card__body {
    padding: 16px;
  }

  .news-lite .news-card--latest .news-card__body {
    padding: 14px;
  }

  .news-lite .news-card:hover {
    transform: none;
  }

  .news-lite .news-card h2 {
    min-height: 0;
  }
}

/* —— Light theme —— */
html.site-unified-chrome[data-theme="light"] body.news-lite-doc .news-lite {
  --news-border: #e8eaef; /* intentional local; ≠ --dt-border */
  --news-surface: var(--dt-card-bg, #ffffff);
}

html.site-unified-chrome[data-theme="light"] body.news-lite-doc .news-lite .hero__badge {
  color: var(--news-accent, var(--dt-color-brand, #6d5ae6));
  background: #f5f3ff;
  border-color: #e9e5ff;
}

html.site-unified-chrome[data-theme="light"] body.news-lite-doc .news-lite-tab {
  background: var(--dt-card-bg, #ffffff);
  border-color: #e5e7eb;
  color: var(--dt-text-muted, #4b5563);
}

html.site-unified-chrome[data-theme="light"] body.news-lite-doc .news-lite-tab:hover {
  background: #fafafa;
  border-color: color-mix(in srgb, var(--news-accent) 18%, #e5e7eb);
  color: var(--dt-text, #111827);
}

html.site-unified-chrome[data-theme="light"] body.news-lite-doc .news-lite-tab.is-active {
  background: color-mix(in srgb, var(--news-accent) 7%, var(--dt-card-bg, #ffffff));
  border-color: color-mix(in srgb, var(--news-accent) 22%, #e5e7eb);
  color: color-mix(in srgb, var(--news-accent) 88%, var(--dt-text, #111827));
  box-shadow: none;
}

html.site-unified-chrome[data-theme="light"] body.news-lite-doc .news-lite-tools-cta {
  background: var(--dt-card-bg, #ffffff);
  border-color: color-mix(in srgb, var(--news-accent) 12%, #e5e7eb);
}

html.site-unified-chrome[data-theme="light"] body.news-lite-doc .news-lite-tools-cta__link {
  background: var(--dt-card-bg, #ffffff);
  border-color: color-mix(in srgb, var(--news-accent) 18%, #e5e7eb);
}

html.site-unified-chrome[data-theme="light"] body.news-lite-doc .news-lite-tools-cta__link:hover {
  background: #f5f3ff;
  border-color: color-mix(in srgb, var(--news-accent) 28%, #e5e7eb);
}

html.site-unified-chrome[data-theme="light"] body.news-lite-doc .news-lite .news-card {
  background: var(--dt-card-bg, #ffffff);
  border-color: var(--dt-border, #ececf1);
}

html.site-unified-chrome[data-theme="light"] body.news-lite-doc .news-lite .news-card:hover {
  border-color: color-mix(in srgb, var(--news-accent) 32%, var(--dt-border, #ececf1));
  background: #fafbff;
}

html.site-unified-chrome[data-theme="light"] body.news-lite-doc .news-lite .news-card--latest,
html.site-unified-chrome[data-theme="light"] body.news-lite-doc .news-lite .news-card--latest:hover {
  background: var(--dt-card-bg, #ffffff);
  border-color: var(--dt-border, #ececf1);
}

html.site-unified-chrome[data-theme="light"] body.news-lite-doc .news-lite .news-card__tag {
  color: var(--news-accent, var(--dt-color-brand, #6d5ae6));
  background: #f5f3ff;
  border-color: #e9e5ff;
}

html.site-unified-chrome[data-theme="light"] body.news-lite-doc .news-lite-empty {
  background: #fafafa;
  border-color: #e5e7eb;
}

/* —— Dark theme —— */
html.site-unified-chrome:is([data-theme="dark"], .dark) body.news-lite-doc .news-lite {
  --news-border: color-mix(in srgb, var(--line) 72%, transparent);
  --news-surface: var(--toket-card-bg, var(--card-bg));
}

html.site-unified-chrome:is([data-theme="dark"], .dark) body.news-lite-doc .news-lite .news-card {
  box-shadow: none;
}

html.site-unified-chrome:is([data-theme="dark"], .dark) body.news-lite-doc .news-lite-tab.is-active {
  background: color-mix(in srgb, var(--news-accent) 14%, var(--news-surface));
  border-color: color-mix(in srgb, var(--news-accent) 36%, var(--line));
  color: color-mix(in srgb, var(--news-accent-2) 90%, #fff);
}

html.site-unified-chrome:is([data-theme="dark"], .dark) body.news-lite-doc .news-lite .news-card:hover {
  border-color: color-mix(in srgb, var(--news-accent) 42%, var(--line));
  background: color-mix(in srgb, var(--news-accent) 6%, var(--news-surface));
}

html.site-unified-chrome:is([data-theme="dark"], .dark) body.news-lite-doc .news-lite .news-card--latest,
html.site-unified-chrome:is([data-theme="dark"], .dark) body.news-lite-doc .news-lite .news-card--latest:hover {
  background: color-mix(in srgb, var(--news-surface) 80%, transparent);
  border-color: var(--news-border);
}

html.site-unified-chrome:is([data-theme="dark"], .dark) body.news-lite-doc .news-lite .news-card__tag {
  background: color-mix(in srgb, var(--news-accent) 16%, transparent);
  border-color: color-mix(in srgb, var(--news-accent) 28%, transparent);
  color: color-mix(in srgb, var(--news-accent-2) 92%, #fff);
}

html.site-unified-chrome:is([data-theme="dark"], .dark) body.news-lite-doc .news-lite-tools-cta {
  background: color-mix(in srgb, var(--news-accent) 5%, var(--news-surface));
  border-color: color-mix(in srgb, var(--news-accent) 16%, var(--line));
}
