:root {
  --yd-coral: #EA580C;
  --yd-coral-dark: #C2410C;
  --yd-navy: #1E293B;
  --yd-ink: #0F172A;
  --yd-muted: #64748B;
  --yd-bg: #F4F6F8;
  --yd-paper: #FFFFFF;
  --yd-line: #E2E8F0;
  --yd-radius: 16px;
  --yd-wrap: 1140px;
  --yd-font: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--yd-font);
  color: var(--yd-ink);
  background: var(--yd-bg);
  line-height: 1.65;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; transition: color .2s, background .2s, border-color .2s, transform .2s, box-shadow .2s; }
a:hover { color: var(--yd-coral); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.3; }

.yd-wrap {
  width: min(100% - 32px, var(--yd-wrap));
  margin-inline: auto;
}

/* Header */
.yd-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--yd-line);
}

.yd-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 70px;
}

.yd-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.yd-logo img { height: 40px; width: auto; }

.yd-logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--yd-navy);
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  box-shadow: 0 6px 0 var(--yd-coral);
}

.yd-logo strong { display: block; font-size: 1.02rem; }
.yd-logo em {
  display: block;
  font-style: normal;
  font-size: 0.72rem;
  color: var(--yd-muted);
  margin-top: 2px;
}

.yd-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.yd-nav > ul {
  display: flex;
  align-items: center;
  gap: 2px;
}

.yd-nav > ul > li { position: relative; }

.yd-nav > ul > li > a {
  display: block;
  padding: 10px 14px;
  font-size: 0.92rem;
  color: #334155;
  border-radius: 999px;
}

.yd-nav > ul > li > a:hover,
.yd-nav > ul > li.is-active > a {
  color: var(--yd-navy);
  background: rgba(234, 88, 12, 0.1);
}

.yd-nav > ul > li.is-active > a {
  color: var(--yd-coral-dark);
  font-weight: 600;
}

.yd-subnav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 160px;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--yd-line);
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
}

.yd-nav > ul > li.has-child:hover > .yd-subnav { display: block; }

.yd-subnav a {
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.88rem;
  color: var(--yd-muted);
}

.yd-subnav a:hover,
.yd-subnav .is-active a {
  background: rgba(234, 88, 12, 0.08);
  color: var(--yd-coral);
}

.yd-search {
  display: flex;
  border: 1px solid var(--yd-line);
  border-radius: 999px;
  overflow: hidden;
  background: #F8FAFC;
}

.yd-search input {
  width: 128px;
  border: 0;
  padding: 8px 12px;
  font-size: 0.85rem;
  outline: none;
  background: transparent;
}

.yd-search button {
  border: 0;
  background: var(--yd-coral);
  color: #fff;
  padding: 8px 14px;
  font-size: 0.82rem;
  cursor: pointer;
}

.yd-nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--yd-line);
  border-radius: 12px;
  background: #fff;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}

.yd-nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--yd-ink);
  border-radius: 2px;
  transition: transform .2s, opacity .2s;
}

body.nav-open .yd-nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.nav-open .yd-nav-toggle span:nth-child(2) { opacity: 0; }
body.nav-open .yd-nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.yd-nav-mask {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 90;
}

body.nav-open .yd-nav-mask { display: block; }

/* Dashboard hero */
.yd-dash {
  padding: 40px 0 28px;
  background:
    linear-gradient(160deg, #1E293B 0%, #334155 55%, #1E293B 100%);
  color: #fff;
}

.yd-eyebrow {
  margin: 0 0 10px;
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  color: #FDBA74;
  font-weight: 700;
}

.yd-dash-head h1 {
  font-size: clamp(1.75rem, 4vw, 2.55rem);
  max-width: 14em;
}

.yd-dash-desc {
  margin: 12px 0 0;
  max-width: 36em;
  color: #CBD5E1;
  font-size: 1.02rem;
}

.yd-dash-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.yd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 22px;
  border-radius: 999px;
  font-size: 0.94rem;
  font-weight: 600;
}

.yd-btn-primary {
  background: var(--yd-coral);
  color: #fff;
}

.yd-btn-primary:hover {
  background: #F97316;
  color: #fff;
}

.yd-btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
}

.yd-btn-ghost:hover {
  border-color: #FDBA74;
  color: #FDBA74;
}

.yd-kpi {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 28px;
}

.yd-kpi-item {
  padding: 16px 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.yd-kpi-item span {
  display: block;
  font-size: 0.78rem;
  color: #94A3B8;
  margin-bottom: 4px;
}

.yd-kpi-item strong {
  font-size: 1.15rem;
  color: #fff;
}

/* Wide story */
.yd-story {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 0;
  margin: 28px 0 24px;
  border-radius: var(--yd-radius);
  overflow: hidden;
  background: var(--yd-paper);
  border: 1px solid var(--yd-line);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.06);
  color: inherit;
}

.yd-story:hover {
  color: inherit;
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(234, 88, 12, 0.12);
}

.yd-story-cover {
  min-height: 280px;
  background: #E2E8F0;
}

.yd-story-cover img {
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
}

.yd-story-ph {
  min-height: 280px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  text-align: center;
  background:
    linear-gradient(135deg, rgba(30,41,59,0.8) 0%, rgba(71,85,105,0.6) 45%, rgba(234,88,12,0.5) 100%);
}

.yd-story-ph span {
  color: #fff;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.5;
  text-shadow: 0 2px 8px rgba(0,0,0,0.35);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.yd-story-body {
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.yd-badge {
  display: inline-block;
  align-self: flex-start;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(234, 88, 12, 0.12);
  color: var(--yd-coral-dark);
  margin-bottom: 12px;
}

.yd-story-body h2 {
  font-size: clamp(1.25rem, 2.5vw, 1.7rem);
  margin-bottom: 12px;
}

.yd-story-body p {
  margin: 0 0 14px;
  color: var(--yd-muted);
  font-size: 0.95rem;
}

.yd-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.82rem;
  color: var(--yd-muted);
}

.yd-meta.center {
  justify-content: center;
  margin: 14px 0 22px;
}

/* Horizontal strip */
.yd-strip-wrap { margin-bottom: 28px; }

.yd-section-hd {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.yd-section-hd h2 {
  font-size: 1.2rem;
  position: relative;
  padding-left: 14px;
}

.yd-section-hd h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35em;
  width: 4px;
  height: 0.9em;
  border-radius: 2px;
  background: var(--yd-coral);
}

.yd-section-hd span,
.yd-section-hd a {
  font-size: 0.85rem;
  color: var(--yd-muted);
}

.yd-section-hd a:hover { color: var(--yd-coral); }

.yd-strip {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.yd-strip::-webkit-scrollbar { height: 6px; }
.yd-strip::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 999px;
}

.yd-strip-card {
  flex: 0 0 240px;
  scroll-snap-align: start;
  padding: 12px;
  background: var(--yd-paper);
  border: 1px solid var(--yd-line);
  border-radius: 14px;
  color: inherit;
}

.yd-strip-card:hover {
  border-color: rgba(234, 88, 12, 0.4);
  color: inherit;
}

.yd-strip-cover {
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 12px;
  min-height: 120px;
  background: #E2E8F0;
}

.yd-strip-cover img {
  width: 100%;
  height: 120px;
  object-fit: cover;
}

.yd-strip-ph {
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  text-align: center;
  background: linear-gradient(145deg, rgba(51,65,85,0.7), rgba(234,88,12,0.5));
}

.yd-strip-ph span {
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.4;
  text-shadow: 0 1px 6px rgba(0,0,0,0.3);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.yd-strip-card h3 {
  font-size: 0.98rem;
  margin-bottom: 8px;
  min-height: 2.6em;
}

.yd-strip-card time {
  font-size: 0.78rem;
  color: var(--yd-muted);
}

/* Triple columns */
.yd-tri {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 48px;
}

.yd-tri-col {
  padding: 18px;
  background: var(--yd-paper);
  border: 1px solid var(--yd-line);
  border-radius: var(--yd-radius);
}

.yd-tri-accent {
  background: linear-gradient(165deg, rgba(234, 88, 12, 0.1), #fff 50%);
  border-color: rgba(234, 88, 12, 0.25);
}

/* Centered section header */
.yd-section-hd.center {
  justify-content: center;
  text-align: center;
}
.yd-section-hd.center h2 { padding-left: 0; }
.yd-section-hd.center h2::before { display: none; }

/* Features section */
.yd-features {
  padding: 48px 0 40px;
}
.yd-feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 8px;
}
.yd-feature-card {
  padding: 28px 22px;
  border-radius: 16px;
  background: var(--yd-paper);
  border: 1px solid var(--yd-line);
  text-align: center;
  transition: box-shadow .25s, transform .25s;
}
.yd-feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(15,23,42,0.1);
}
.yd-feature-ico {
  font-size: 2rem;
  margin-bottom: 14px;
}
.yd-feature-card h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}
.yd-feature-card p {
  font-size: 0.9rem;
  color: var(--yd-muted);
  line-height: 1.6;
}

/* CTA section */
.yd-cta {
  margin-top: 40px;
  padding: 48px 0;
  background: linear-gradient(160deg, var(--yd-navy) 0%, #334155 55%, var(--yd-navy) 100%);
  color: #fff;
}
.yd-cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.yd-cta h2 {
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  margin-bottom: 8px;
}
.yd-cta p {
  color: #CBD5E1;
  font-size: 1rem;
}
.yd-cta-actions {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}
.yd-cta .yd-btn-ghost {
  border-color: rgba(255,255,255,0.4);
  color: #fff;
}
.yd-cta .yd-btn-ghost:hover {
  background: rgba(255,255,255,0.1);
}

.yd-plain-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--yd-line);
  font-size: 0.9rem;
}

.yd-plain-list li:last-child { border-bottom: 0; }

.yd-plain-list span {
  flex-shrink: 0;
  color: var(--yd-muted);
  font-size: 0.8rem;
}

/* Inner */
.yd-crumb {
  padding: 14px 0;
  font-size: 0.88rem;
  color: var(--yd-muted);
  border-bottom: 1px solid var(--yd-line);
  background: #fff;
}

.yd-crumb span { margin: 0 6px; color: #CBD5E1; }

.yd-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
  padding: 28px 0 48px;
}

.yd-panel {
  background: var(--yd-paper);
  border: 1px solid var(--yd-line);
  border-radius: var(--yd-radius);
  padding: 18px;
  margin-bottom: 18px;
}

.yd-panel-hd {
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--yd-line);
}

.yd-panel-hd h3 { font-size: 1rem; }

.yd-list-panel,
.yd-detail { margin-bottom: 0; }

.yd-page-title {
  font-size: 1.4rem;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--yd-line);
}

.yd-article-list li { border-bottom: 1px solid var(--yd-line); }
.yd-article-list li:last-child { border-bottom: 0; }

.yd-article-list a {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  align-items: flex-start;
  color: inherit;
}

.yd-article-list img {
  width: 140px;
  height: 96px;
  object-fit: cover;
  border-radius: 12px;
  flex-shrink: 0;
}

.yd-article-list h2 {
  font-size: 1.08rem;
  margin-bottom: 8px;
}

.yd-article-list p {
  margin: 0 0 8px;
  font-size: 0.9rem;
  color: var(--yd-muted);
}

.yd-detail > h1 {
  font-size: clamp(1.35rem, 3vw, 1.8rem);
  text-align: center;
}

.yd-richtext {
  font-size: 1.02rem;
  line-height: 1.85;
  color: #334155;
}

.yd-richtext p { margin: 0 0 1em; }
.yd-richtext img { margin: 1em auto; border-radius: 12px; }
.yd-richtext h2, .yd-richtext h3 { margin: 1.2em 0 0.6em; }

.yd-pagerow {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--yd-line);
  font-size: 0.92rem;
}

.yd-pagerow a { color: var(--yd-coral); }
.yd-pagerow span { color: var(--yd-muted); }

.yd-empty {
  padding: 40px 0;
  text-align: center;
  color: var(--yd-muted);
}

.yd-rank { counter-reset: ydrank; }

.yd-rank li {
  counter-increment: ydrank;
  display: flex;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--yd-line);
  font-size: 0.88rem;
}

.yd-rank li:last-child { border-bottom: 0; }

.yd-rank li::before {
  content: counter(ydrank);
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  background: #F1F5F9;
  color: var(--yd-navy);
}

.yd-rank li:nth-child(-n+3)::before {
  background: var(--yd-coral);
  color: #fff;
}

.yd-side-list li {
  padding: 8px 0;
  border-bottom: 1px solid var(--yd-line);
  font-size: 0.9rem;
}

.yd-side-list li:last-child { border-bottom: 0; }

.yd-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.yd-tags a {
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--yd-muted);
  border: 1px solid var(--yd-line);
  background: #F8FAFC;
}

.yd-tags a:hover {
  color: var(--yd-coral);
  border-color: var(--yd-coral);
}

.yd-ad {
  font-size: 0.9rem;
  color: var(--yd-muted);
}

.yd-pagination { margin-top: 22px; }

.yd-page {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.yd-page a,
.yd-page .dots {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid var(--yd-line);
  font-size: 0.88rem;
  color: var(--yd-muted);
  background: #fff;
}

.yd-page .active a,
.yd-page a:hover {
  background: var(--yd-coral);
  border-color: var(--yd-coral);
  color: #fff;
}

/* Footer */
.yd-footer {
  padding: 44px 0 26px;
  background: #0F172A;
  color: #CBD5E1;
}

.yd-footer a { color: #CBD5E1; }
.yd-footer a:hover { color: #FDBA74; }

.yd-footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
  margin-bottom: 24px;
}

.yd-footer h3 {
  color: #fff;
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.yd-footer h4 {
  color: #FDBA74;
  font-size: 0.92rem;
  margin-bottom: 12px;
}

.yd-footer p {
  margin: 0 0 8px;
  font-size: 0.9rem;
  color: #94A3B8;
}

.yd-foot-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.yd-foot-links a { font-size: 0.9rem; }

.yd-friendlinks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  padding: 14px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.85rem;
}

.yd-copy {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.82rem;
  color: #94A3B8;
}

/* Responsive */
@media (max-width: 960px) {
  .yd-story,
  .yd-tri,
  .yd-layout { grid-template-columns: 1fr; }
  .yd-kpi { grid-template-columns: 1fr; }
  .yd-footer-grid { grid-template-columns: 1fr; }
  .yd-side { order: 2; }
  .yd-story-cover,
  .yd-story-cover img,
  .yd-story-ph { min-height: 200px; }
  .yd-feature-grid { grid-template-columns: repeat(2, 1fr); }
  .yd-cta-inner { justify-content: center; text-align: center; }
}

@media (max-width: 768px) {
  .yd-nav-toggle { display: flex; }

  .yd-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: min(86vw, 320px);
    height: 100vh;
    z-index: 110;
    flex-direction: column;
    align-items: stretch;
    padding: 80px 20px 24px;
    background: #fff;
    border-left: 1px solid var(--yd-line);
    transform: translateX(105%);
    transition: transform .28s ease;
    overflow-y: auto;
  }

  .yd-nav.is-open { transform: translateX(0); }

  .yd-nav > ul {
    flex-direction: column;
    align-items: stretch;
  }

  .yd-nav > ul > li > a {
    border-radius: 10px;
    padding: 12px 14px;
  }

  .yd-subnav {
    position: static;
    display: none;
    margin: 0 0 4px 10px;
    box-shadow: none;
    border: 0;
    padding: 0;
  }

  .yd-nav > ul > li.has-child.is-open > .yd-subnav,
  .yd-nav > ul > li.has-child:hover > .yd-subnav { display: block; }

  .yd-search { width: 100%; margin-top: 14px; }
  .yd-search input { width: 100%; flex: 1; }

  .yd-dash { padding: 32px 0 24px; }
  .yd-story-body { padding: 22px 18px; }
  .yd-strip-card { flex-basis: 200px; }
  .yd-feature-grid { grid-template-columns: 1fr; }

  .yd-article-list a { flex-direction: column; }
  .yd-article-list img {
    width: 100%;
    height: 160px;
  }

  .yd-detail > h1 { text-align: left; }
  .yd-meta.center { justify-content: flex-start; }
}

/* ============================================================
   Dark theme (add-on) — default stays light unless data-theme="dark"
   ============================================================ */
html[data-theme="dark"],
body[data-theme="dark"] {
  --yd-coral: #FB923C;
  --yd-coral-dark: #F97316;
  --yd-navy: #CBD5E1;
  --yd-ink: #E8EDF5;
  --yd-muted: #94A3B8;
  --yd-bg: #0F1620;
  --yd-paper: rgba(26, 33, 44, 0.8);
  --yd-line: rgba(148, 163, 184, 0.15);
}

html[data-theme="dark"] body {
  color: #E8EDF5;
  background: linear-gradient(180deg, #0F1620 0%, #0B0F14 100%);
  background-attachment: fixed;
}

/* Global smooth transition for color-aware surfaces (excludes <a>, which
   already transitions via the base `a` rule, to avoid clobbering transforms). */
body,
.yd-header,
.yd-subnav,
.yd-search,
.yd-nav-toggle,
.yd-tri-col,
.yd-panel,
.yd-crumb,
.yd-rank li::before,
.yd-footer,
.yd-richtext,
.yd-theme-toggle {
  transition: background-color .3s ease, color .3s ease, border-color .3s ease;
}

/* Header */
html[data-theme="dark"] .yd-header {
  background: rgba(15, 22, 32, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: rgba(148, 163, 184, 0.15);
}

html[data-theme="dark"] .yd-logo-mark {
  background: #1E293B;
  box-shadow: 0 6px 0 var(--yd-coral);
}

html[data-theme="dark"] .yd-logo em { color: #94A3B8; }

html[data-theme="dark"] .yd-nav > ul > li > a {
  color: #CBD5E1;
}

html[data-theme="dark"] .yd-nav > ul > li > a:hover,
html[data-theme="dark"] .yd-nav > ul > li.is-active > a {
  color: #fff;
  background: rgba(251, 146, 60, 0.14);
}

html[data-theme="dark"] .yd-nav > ul > li.is-active > a {
  color: var(--yd-coral);
}

html[data-theme="dark"] .yd-subnav {
  background: #1A2128;
  border-color: rgba(148, 163, 184, 0.15);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}

html[data-theme="dark"] .yd-subnav a { color: #94A3B8; }

html[data-theme="dark"] .yd-subnav a:hover,
html[data-theme="dark"] .yd-subnav .is-active a {
  background: rgba(251, 146, 60, 0.12);
  color: var(--yd-coral);
}

/* Search */
html[data-theme="dark"] .yd-search {
  background: rgba(15, 22, 32, 0.6);
  border-color: rgba(148, 163, 184, 0.15);
}

html[data-theme="dark"] .yd-search input { color: #E8EDF5; }
html[data-theme="dark"] .yd-search input::placeholder { color: #64748B; }

/* Nav toggle */
html[data-theme="dark"] .yd-nav-toggle {
  background: rgba(26, 33, 44, 0.8);
  border-color: rgba(148, 163, 184, 0.15);
}

html[data-theme="dark"] .yd-nav-toggle span { background: #E8EDF5; }

/* Story / cards */
html[data-theme="dark"] .yd-story {
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.4);
}

html[data-theme="dark"] .yd-story:hover {
  box-shadow: 0 18px 40px rgba(251, 146, 60, 0.18);
}

html[data-theme="dark"] .yd-story-cover,
html[data-theme="dark"] .yd-strip-cover {
  background: #1A2128;
}

html[data-theme="dark"] .yd-badge {
  background: rgba(251, 146, 60, 0.16);
  color: var(--yd-coral);
}

html[data-theme="dark"] .yd-strip-card:hover {
  border-color: rgba(251, 146, 60, 0.45);
}

html[data-theme="dark"] .yd-tri-accent {
  background: linear-gradient(165deg, rgba(251, 146, 60, 0.12), rgba(26, 33, 44, 0.6) 50%);
  border-color: rgba(251, 146, 60, 0.3);
}

/* Inner panels */
html[data-theme="dark"] .yd-crumb {
  background: transparent;
  color: #94A3B8;
}

html[data-theme="dark"] .yd-crumb span { color: #475569; }

html[data-theme="dark"] .yd-richtext { color: #CBD5E1; }

/* Tags */
html[data-theme="dark"] .yd-tags a {
  background: rgba(26, 33, 44, 0.6);
}

/* Rank */
html[data-theme="dark"] .yd-rank li::before {
  background: rgba(148, 163, 184, 0.18);
  color: #CBD5E1;
}

/* Pagination */
html[data-theme="dark"] .yd-page a,
html[data-theme="dark"] .yd-page .dots {
  background: rgba(26, 33, 44, 0.7);
}

/* Footer */
html[data-theme="dark"] .yd-footer {
  background: #0B0F14;
}

/* Mobile nav panel */
@media (max-width: 768px) {
  html[data-theme="dark"] .yd-nav {
    background: #0F1620;
    border-left-color: rgba(148, 163, 184, 0.15);
  }
}

/* Theme toggle button */
.yd-theme-toggle {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--yd-line);
  border-radius: 12px;
  background: var(--yd-paper);
  color: var(--yd-ink);
  cursor: pointer;
  padding: 0;
  transition: background-color .25s ease, color .25s ease, border-color .25s ease, transform .2s ease;
}

.yd-theme-toggle:hover {
  color: var(--yd-coral);
  border-color: var(--yd-coral);
  transform: translateY(-1px);
}

.yd-theme-toggle:focus-visible {
  outline: 2px solid var(--yd-coral);
  outline-offset: 2px;
}

.yd-theme-toggle svg {
  width: 20px;
  height: 20px;
}

.yd-theme-toggle .yd-icon-sun { display: none; }
.yd-theme-toggle .yd-icon-moon { display: block; }

html[data-theme="dark"] .yd-theme-toggle {
  background: rgba(26, 33, 44, 0.8);
  color: #FDBA74;
  border-color: rgba(148, 163, 184, 0.2);
}

html[data-theme="dark"] .yd-theme-toggle .yd-icon-sun { display: block; }
html[data-theme="dark"] .yd-theme-toggle .yd-icon-moon { display: none; }
