/* DimSum News — shared stylesheet (mobile-first) */
:root {
  --red: #9b1b30;
  --red-dark: #7a1526;
  --white: #ffffff;
  --grey-900: #1e1e1e;
  --grey-800: #2b2b2b;
  --grey-700: #3d3d3d;
  --grey-500: #6b6b6b;
  --grey-200: #e8e8e8;
  --grey-100: #f5f5f5;
  --text: #252525;
  --muted: #5a5a5a;
  --focus: #0066cc;
  --radius: 12px;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  --font: "Georgia", "Times New Roman", Times, serif;
  --font-ui: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--grey-100);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--red);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--red-dark);
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0.75rem;
  background: var(--grey-900);
  color: var(--white);
  padding: 0.5rem 1rem;
  z-index: 1000;
  border-radius: 6px;
}

.skip-link:focus {
  left: 0.75rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  background: var(--grey-900);
  color: var(--white);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow);
}

.header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  text-decoration: none;
  color: inherit;
}

.brand:hover {
  color: var(--white);
}

.brand-name {
  font-family: var(--font);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: 0.02em;
  line-height: 1.1;
}

.brand-tag {
  font-size: 0.75rem;
  opacity: 0.85;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
  border-radius: 8px;
}

.menu-toggle span {
  display: block;
  height: 2px;
  width: 24px;
  background: var(--white);
  margin: 0 auto;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-primary {
  width: 100%;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: none;
  flex-direction: column;
  gap: 0;
  background: var(--grey-800);
}

.nav-primary.is-open .nav-list {
  display: flex;
}

.nav-list a {
  display: block;
  padding: 0.9rem 1rem;
  color: var(--white);
  text-decoration: none;
  border-bottom: 1px solid var(--grey-700);
}

.nav-list a:hover,
.nav-list a[aria-current="page"] {
  background: var(--red);
  color: var(--white);
}

.nav-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
}

@media (min-width: 768px) {
  .header-inner {
    flex-wrap: nowrap;
    padding: 0.85rem 1.25rem;
  }

  .menu-toggle {
    display: none;
  }

  .nav-wrap {
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
  }

  .nav-primary .nav-list {
    display: flex;
    flex-direction: row;
    gap: 0.25rem;
    background: transparent;
    align-items: center;
  }

  .nav-list a {
    border: 0;
    border-radius: 8px;
    padding: 0.5rem 0.9rem;
    font-size: 0.95rem;
  }
}

.hero {
  background: linear-gradient(135deg, var(--grey-900) 0%, var(--grey-800) 50%, #4a0f1a 100%);
  color: var(--white);
  padding: 2.25rem 1rem 2.5rem;
}

.hero-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  gap: 1.5rem;
}

.hero-kicker {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.8);
  margin: 0 0 0.35rem;
}

.hero-title {
  font-family: var(--font);
  font-size: clamp(1.75rem, 5vw, 2.6rem);
  line-height: 1.15;
  margin: 0 0 0.75rem;
  font-weight: 700;
}

.hero-lead {
  margin: 0;
  font-size: 1.05rem;
  max-width: 40rem;
  color: rgba(255, 255, 255, 0.92);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.btn {
  display: inline-block;
  padding: 0.65rem 1.15rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  font-family: var(--font-ui);
}

.btn-primary {
  background: var(--red);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--red-dark);
  color: var(--white);
}

.btn-ghost {
  border-color: rgba(255, 255, 255, 0.45);
  color: var(--white);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
}

.layout {
  max-width: 1120px;
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
  display: grid;
  gap: 2rem;
}

@media (min-width: 960px) {
  .layout {
    grid-template-columns: 1fr 320px;
    align-items: start;
  }
}

/* —— Article pages (two-column + hero + related) —— */
.article-page .article-main.prose {
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 0;
}

.article-hero-img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 8px;
  margin: 0 0 1.75rem;
  box-shadow: var(--shadow);
}

.author-bio {
  margin-top: 2.5rem;
  padding: 1.35rem 1.4rem;
  background: var(--grey-100);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius);
  border-left: 4px solid var(--red);
  box-shadow: var(--shadow);
}

.author-bio-title {
  font-family: var(--font);
  font-size: 1.08rem;
  margin: 0 0 0.65rem;
  color: var(--grey-900);
  font-weight: 700;
}

.author-bio p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.55;
}

.related-guides {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1rem 3.5rem;
}

.related-guides .section-head {
  margin-bottom: 1.25rem;
}

@media (min-width: 900px) {
  .related-guides .related-guides-grid.card-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 1.25rem;
  border-bottom: 3px solid var(--red);
  padding-bottom: 0.5rem;
}

.section-title {
  font-family: var(--font);
  font-size: 1.35rem;
  margin: 0;
  font-weight: 700;
  color: var(--grey-900);
}

.section-link {
  font-size: 0.9rem;
  font-weight: 600;
}

/* —— Homepage featured lead —— */
.featured-story {
  margin: 0 0 2.5rem;
}

.featured-inner {
  display: grid;
  overflow: hidden;
  border-radius: calc(var(--radius) + 4px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.14);
  border: 1px solid rgba(0, 0, 0, 0.07);
  background: var(--white);
}

@media (min-width: 900px) {
  .featured-inner {
    grid-template-columns: 1.22fr 1fr;
    min-height: 300px;
  }
}

.featured-media {
  position: relative;
  overflow: hidden;
  background: var(--grey-200);
}

.featured-img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 8px 8px 0 0;
}

@media (min-width: 900px) {
  .featured-media {
    align-self: stretch;
    min-height: 300px;
  }

  .featured-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    aspect-ratio: unset;
    min-height: 100%;
    border-radius: 0;
  }
}

.featured-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 1;
  background: var(--red);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  padding: 0.45rem 0.75rem;
  border-radius: 6px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.featured-content {
  padding: 1.55rem 1.4rem 1.65rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.65rem;
}

@media (min-width: 900px) {
  .featured-content {
    padding: 2rem 2rem 2.1rem;
  }
}

.featured-kicker {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--muted);
}

.featured-title {
  font-family: var(--font);
  font-size: clamp(1.45rem, 3.5vw, 2rem);
  line-height: 1.15;
  margin: 0;
  font-weight: 700;
  color: var(--grey-900);
}

.featured-title a {
  color: inherit;
  text-decoration: none;
}

.featured-title a:hover {
  color: var(--red);
}

.featured-dek {
  margin: 0;
  font-size: 1.02rem;
  color: var(--muted);
  line-height: 1.55;
  max-width: 36rem;
}

.featured-meta {
  margin: 0;
  font-size: 0.88rem;
  color: var(--grey-500);
}

.featured-meta strong {
  color: var(--grey-800);
  font-weight: 600;
}

.featured-cta {
  margin-top: 0.35rem;
}

.featured-cta .btn {
  border-radius: 8px;
}

.featured-cta .btn-primary:hover {
  color: var(--white);
}

/* —— Story cards & category pills —— */
.card-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 600px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  min-height: 100%;
  border: 1px solid rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

@media (hover: hover) {
  .card:hover {
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.11);
    transform: translateY(-2px);
  }
}

.card-image {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--grey-200);
}

.card-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px 8px 0 0;
  display: block;
}

.card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.15rem;
}

.category-pill {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.32rem 0.58rem;
  border-radius: 4px;
  background: var(--grey-200);
  color: var(--grey-800);
  line-height: 1;
}

.category-pill--streaming {
  background: #f5e0e4;
  color: var(--red-dark);
}

.category-pill--digital {
  background: #e8eef5;
  color: #2c4a6e;
}

.category-pill--cdrama {
  background: #f2ebe4;
  color: #5c4032;
}

.category-pill--analysis {
  background: var(--grey-900);
  color: var(--white);
}

.category-pill--compare {
  background: #ede6f0;
  color: #4a2d55;
}

.category-pill--apps {
  background: #e6f2ef;
  color: #1f5c48;
}

.category-pill--ewallet {
  background: #fdf3e4;
  color: #7a4a12;
}

.card-body {
  padding: 1.1rem 1.15rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.card-meta {
  font-size: 0.8rem;
  color: var(--muted);
}

.card-title {
  font-family: var(--font);
  font-size: 1.1rem;
  line-height: 1.35;
  margin: 0;
}

.card-title a {
  color: var(--grey-900);
  text-decoration: none;
}

.card-title a:hover {
  color: var(--red);
}

.card-excerpt {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
  flex: 1;
}

.card-read {
  font-weight: 600;
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.panel {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.15rem 1.2rem;
  box-shadow: var(--shadow);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.panel-title {
  font-family: var(--font);
  font-size: 1.05rem;
  margin: 0 0 0.85rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--grey-200);
  color: var(--grey-900);
}

.trend-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.trend-list li {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
}

.trend-num {
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 8px;
  background: var(--red);
  color: var(--white);
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.trend-list a {
  font-weight: 600;
  text-decoration: none;
  color: var(--grey-900);
}

.trend-list a:hover {
  color: var(--red);
}

/* —— Newsletter panel —— */
.panel--newsletter {
  background: linear-gradient(165deg, var(--grey-900) 0%, #2a1218 55%, var(--grey-800) 100%);
  color: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
}

.panel--newsletter::before {
  content: "";
  position: absolute;
  top: -40%;
  right: -25%;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(155, 27, 48, 0.45) 0%, transparent 70%);
  pointer-events: none;
}

.panel--newsletter .panel-title {
  color: var(--white);
  border-bottom-color: rgba(255, 255, 255, 0.18);
  position: relative;
}

.newsletter-dek {
  margin: 0 0 1rem;
  font-size: 0.92rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.82);
  position: relative;
}

.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  position: relative;
}

@media (min-width: 400px) {
  .newsletter-form {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: stretch;
  }

  .newsletter-form .input-email {
    flex: 1;
    min-width: 160px;
  }

  .newsletter-form .btn-newsletter {
    flex-shrink: 0;
  }
}

.input-email {
  width: 100%;
  padding: 0.72rem 0.95rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(0, 0, 0, 0.22);
  color: var(--white);
  font-family: var(--font-ui);
  font-size: 0.95rem;
}

.input-email::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.input-email:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 2px rgba(155, 27, 48, 0.35);
}

.btn-newsletter {
  padding: 0.72rem 1.15rem;
  border-radius: 8px;
  border: 0;
  background: var(--red);
  color: var(--white);
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  font-family: var(--font-ui);
}

.btn-newsletter:hover {
  background: var(--red-dark);
}

.newsletter-fineprint {
  margin: 0.75rem 0 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.62);
  position: relative;
}

.panel--newsletter .newsletter-fineprint a {
  color: #ffb3c0;
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.panel--newsletter .newsletter-fineprint a:hover {
  color: var(--white);
}

.site-footer {
  background: var(--grey-900);
  color: rgba(255, 255, 255, 0.88);
  padding: 2.5rem 1rem;
  margin-top: auto;
}

.footer-inner {
  max-width: 1140px;
  margin: 0 auto;
  display: block;
}

.site-footer .footer-links a:hover {
  color: #ffffff !important;
}

@media (max-width: 639px) {
  .site-footer .footer-grid {
    grid-template-columns: 1fr !important;
  }
}

.footer-tags {
  grid-column: 1 / -1;
  padding-top: 0.5rem;
  border-top: 1px solid var(--grey-700);
}

.footer-tags-title {
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.9);
}

.tag-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag-list a {
  display: inline-block;
  padding: 0.38rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--grey-700);
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.04);
}

.tag-list a:hover {
  border-color: var(--red);
  color: var(--white);
  background: rgba(155, 27, 48, 0.2);
}

.footer-col-title {
  margin: 0 0 0.6rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.88;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
}

.footer-brand {
  font-family: var(--font);
  font-weight: 700;
  font-size: 1.2rem;
  margin: 0 0 0.35rem;
}

.footer-note {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.75);
  max-width: 36rem;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.footer-links a {
  color: var(--white);
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}

.footer-bottom {
  border-top: 1px solid var(--grey-700);
  padding-top: 1rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.65);
}

.page-hero {
  background: var(--white);
  padding: 1.75rem 1rem;
  border-bottom: 4px solid var(--red);
}

.page-hero-inner {
  max-width: 760px;
  margin: 0 auto;
}

.page-title {
  font-family: var(--font);
  font-size: clamp(1.6rem, 4vw, 2.1rem);
  margin: 0 0 0.5rem;
}

.page-lead {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.prose {
  max-width: 760px;
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
}

.prose h2 {
  font-family: var(--font);
  font-size: 1.35rem;
  margin: 2rem 0 0.75rem;
  color: var(--grey-900);
}

.prose h2:first-child {
  margin-top: 0;
}

.prose p {
  margin: 0 0 1rem;
}

.prose ul {
  margin: 0 0 1rem 1.1rem;
  padding: 0;
}

.breadcrumbs {
  max-width: 760px;
  margin: 0 auto;
  padding: 1rem 1rem 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.breadcrumbs ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.breadcrumbs li:not(:last-child)::after {
  content: "/";
  margin-left: 0.35rem;
  color: var(--grey-500);
}

.breadcrumbs a {
  font-weight: 600;
}

.banner-bilingual {
  background: linear-gradient(90deg, var(--grey-900), var(--red-dark));
  color: var(--white);
  padding: 1.25rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
}

.banner-bilingual p {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  line-height: 1.45;
}

.banner-bilingual p:last-child {
  margin-bottom: 0;
}

.zh {
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", SimHei, sans-serif;
}

.app-recs {
  display: grid;
  gap: 1rem;
}

@media (min-width: 720px) {
  .app-recs {
    grid-template-columns: repeat(3, 1fr);
  }
}

.app-card {
  background: var(--grey-100);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius);
  padding: 1.1rem;
}

.app-card h3 {
  font-family: var(--font);
  font-size: 1.05rem;
  margin: 0 0 0.5rem;
}

.app-card p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
}

.article-hero-meta {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.trust-badge {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--muted);
  background: #f0f0f0;
  border: 1px solid var(--grey-200);
  border-radius: 6px;
  padding: 0.55rem 0.75rem;
  margin: 0 0 0.85rem;
  max-width: 42em;
}
