/* Content pages — readable, mobile-first, scoped so main-site CSS cannot crush layout */

body.content-body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body, "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif);
  background: var(--color-bg, #0a0f18);
  color: var(--color-text, #f5f5f5);
}

[data-theme="light"] body.content-body {
  background: #eef2f7;
  color: #0f172a;
}

.content-shell {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
}

.content-top {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 3.5rem;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--color-border, rgba(255, 255, 255, 0.12));
  background: rgba(10, 15, 24, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

[data-theme="light"] .content-top {
  background: rgba(238, 242, 247, 0.94);
  border-bottom-color: rgba(15, 23, 42, 0.1);
}

.content-top__brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}

.content-top__brand img {
  display: block;
  height: 2rem;
  width: auto;
  max-width: 7.5rem;
  object-fit: contain;
}

[data-theme="light"] .content-top__brand img {
  /* logo is designed for dark bars; keep readable on light */
  filter: none;
}

.content-top__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem 0.85rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.875rem;
}

.content-top__links a {
  color: var(--color-text-muted, #9ca3af);
  text-decoration: none;
  padding: 0.25rem 0;
}

.content-top__links a:hover,
.content-top__links a[aria-current="page"] {
  color: var(--color-text, #f5f5f5);
}

[data-theme="light"] .content-top__links a {
  color: #64748b;
}

[data-theme="light"] .content-top__links a:hover,
[data-theme="light"] .content-top__links a[aria-current="page"] {
  color: #0f172a;
}

.content-main {
  width: min(40rem, 100%);
  margin: 0 auto;
  padding: 1.75rem 1.15rem 3.5rem;
  box-sizing: border-box;
}

@media (min-width: 640px) {
  .content-main {
    padding: 2.5rem 1.5rem 4rem;
  }

  .content-top {
    padding: 0.75rem 1.5rem;
  }

  .content-top__brand img {
    height: 2.25rem;
  }
}

.content-kicker {
  margin: 0 0 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #94a3b8;
}

[data-theme="light"] .content-kicker {
  color: #64748b;
}

.content-main > h1 {
  margin: 0 0 1rem;
  font-family: var(--font-display, Outfit, "Noto Sans TC", sans-serif);
  font-size: clamp(1.65rem, 5.5vw, 2.35rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: inherit;
}

.content-lead {
  margin: 0 0 2rem;
  font-size: clamp(1rem, 2.8vw, 1.125rem);
  line-height: 1.75;
  color: #cbd5e1;
}

[data-theme="light"] .content-lead {
  color: #334155;
}

.content-main h2 {
  margin: 2.25rem 0 0.85rem;
  font-size: clamp(1.15rem, 3.5vw, 1.35rem);
  line-height: 1.35;
  color: inherit;
}

.content-main p {
  margin: 0 0 1rem;
  font-size: 1rem;
  line-height: 1.8;
  color: #e2e8f0;
}

[data-theme="light"] .content-main p {
  color: #1e293b;
}

.content-main a {
  color: #38bdf8;
  text-underline-offset: 0.15em;
}

[data-theme="light"] .content-main a {
  color: #0369a1;
}

.content-main strong {
  color: inherit;
  font-weight: 700;
}

/* FAQ accordion */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin: 0;
  padding: 0;
}

.faq-item {
  margin: 0;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.55);
  overflow: hidden;
}

[data-theme="light"] .faq-item {
  background: #fff;
  border-color: rgba(15, 23, 42, 0.1);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.faq-item summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.05rem;
  cursor: pointer;
  list-style: none;
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.45;
  color: inherit;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item__icon {
  flex-shrink: 0;
  width: 1.25rem;
  text-align: center;
  opacity: 0.65;
  font-weight: 500;
}

.faq-item__icon::before {
  content: '+';
}

.faq-item[open] .faq-item__icon {
  opacity: 1;
}

.faq-item[open] .faq-item__icon::before {
  content: '–';
}

.faq-item__body {
  padding: 0 1.05rem 1.1rem;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.faq-item__body p {
  margin: 0.9rem 0 0;
}

/* Cases */
.case-card {
  margin: 0 0 1rem;
  padding: 1.15rem 1.1rem 1.2rem;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.55);
}

[data-theme="light"] .case-card {
  background: #fff;
  border-color: rgba(15, 23, 42, 0.1);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.case-card__tag {
  display: inline-block;
  margin: 0 0 0.55rem;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  color: #7dd3fc;
  background: rgba(14, 165, 233, 0.14);
}

[data-theme="light"] .case-card__tag {
  color: #0369a1;
  background: rgba(3, 105, 161, 0.1);
}

.case-card h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.1rem, 3.4vw, 1.3rem);
}

.case-card p {
  margin: 0 0 0.65rem;
}

.case-card p:last-child {
  margin-bottom: 0;
}

.content-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 2rem;
}

@media (min-width: 480px) {
  .content-actions {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }
}

.content-actions .btn {
  justify-content: center;
  text-align: center;
}

.content-actions a:not(.btn) {
  font-size: 0.95rem;
}

.content-foot {
  margin-top: auto;
  padding: 1.25rem 1rem 1.75rem;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  text-align: center;
  font-size: 0.85rem;
  color: #94a3b8;
}

[data-theme="light"] .content-foot {
  color: #64748b;
  border-top-color: rgba(15, 23, 42, 0.1);
}

.content-foot nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1.1rem;
  margin-top: 0.65rem;
}

.content-foot a {
  color: inherit;
}

/* Self-contained CTA (no dependency on site.min.css) */
.content-body .page-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(14, 165, 233, 0.18), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 20%, rgba(56, 189, 248, 0.08), transparent 50%);
}

[data-theme="light"] .content-body .page-bg {
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(14, 165, 233, 0.12), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 20%, rgba(3, 105, 161, 0.06), transparent 50%);
}

.content-actions .btn,
.content-actions a.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.65rem 1.25rem;
  border-radius: 10px;
  border: none;
  font: inherit;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  box-sizing: border-box;
}

.content-actions .btn-primary,
.content-actions a.btn-primary {
  color: #0a0f18;
  background: #38bdf8;
}

.content-actions .btn-primary:hover,
.content-actions a.btn-primary:hover {
  background: #7dd3fc;
  color: #0a0f18;
}

@media (max-width: 480px) {
  .content-top__links {
    font-size: 0.8rem;
    gap: 0.25rem 0.65rem;
  }

  .faq-item summary,
  .case-card {
    padding-left: 0.9rem;
    padding-right: 0.9rem;
  }
}
