/*
Theme Name: Stability Brand
Theme URI: https://stability-investment.com
Author: 穩投大師 Stability Investment
Description: Institutional wealth education & long-term personal finance brand theme for 穩投大師 (stability-investment.com). Graphite slate & brass gold palette, prominent YMYL non-advisory disclosures.
Version: 1.0.0
Text Domain: stability-brand
*/

:root {
  --slate-950: #0B1120;
  --slate-900: #111827;
  --slate-800: #1F2937;
  --slate-700: #374151;
  --slate-500: #6B7280;
  --slate-200: #E5E7EB;
  --slate-100: #F3F4F6;
  --slate-50: #F9FAFB;
  --brass-700: #854D0E;
  --brass-600: #A16207;
  --brass-500: #CA8A04;
  --brass-100: #FEF9C3;
  --brass-50: #FEFCE8;
  --white: #FFFFFF;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 4px rgba(17, 24, 39, 0.05);
  --shadow-md: 0 12px 30px rgba(17, 24, 39, 0.1);
  --container: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Noto Sans TC", "Inter", "PingFang TC", "Microsoft JhengHei", sans-serif;
  color: var(--slate-900);
  background: var(--slate-50);
  line-height: 1.78;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: "Noto Serif TC", "Songti TC", Georgia, serif; }

a {
  color: var(--brass-700);
  text-decoration: none;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
a:hover { color: var(--slate-900); }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--slate-200);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 76px; gap: 20px; }

.si-brand { display: inline-flex; align-items: center; gap: 12px; color: var(--slate-900); }
.si-brand:hover { color: var(--slate-900); }
.si-mark {
  width: 40px; height: 40px; border-radius: 8px;
  background: var(--slate-900); color: #FDE047;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: "Noto Serif TC", serif; font-weight: 700; font-size: 19px;
  border: 1px solid rgba(202, 138, 4, 0.45);
}
.si-titles { display: flex; flex-direction: column; line-height: 1.18; }
.si-name { font-family: "Noto Serif TC", serif; font-weight: 700; font-size: 19px; color: var(--slate-900); letter-spacing: 0.04em; }
.si-sub { font-size: 11px; color: var(--slate-500); letter-spacing: 0.08em; }

.si-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 2px; }
.si-nav li a { display: inline-block; padding: 8px 11px; border-radius: 6px; font-size: 14px; font-weight: 600; color: var(--slate-700); }
.si-nav li a:hover, .si-nav li.current-menu-item > a { background: var(--slate-100); color: var(--slate-900); }

.si-toggle {
  display: none; background: var(--white); border: 1px solid var(--slate-200);
  border-radius: 8px; padding: 7px 12px; font-size: 14px; font-weight: 600;
  color: var(--slate-900); cursor: pointer;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: 8px; font-weight: 700; font-size: 14.5px;
  border: 1.5px solid transparent; cursor: pointer;
}
.btn-brass {
  background: var(--brass-600); color: var(--white);
  box-shadow: 0 6px 18px rgba(161, 98, 7, 0.25);
}
.btn-brass:hover { background: var(--brass-700); color: var(--white); transform: translateY(-1px); }
.btn-outline-light { background: rgba(255,255,255,0.06); color: var(--white); border-color: rgba(255,255,255,0.28); }
.btn-outline-light:hover { background: rgba(255,255,255,0.14); color: var(--white); }
.btn-outline { background: var(--white); color: var(--slate-900); border-color: var(--slate-200); }
.btn-outline:hover { border-color: var(--slate-900); color: var(--slate-900); }

/* ===== Institutional Dark Graphite Hero ===== */
.si-hero {
  background: radial-gradient(circle at 86% 18%, rgba(202, 138, 4, 0.16), transparent 44%),
              linear-gradient(135deg, var(--slate-950) 0%, var(--slate-900) 60%, var(--slate-800) 100%);
  color: var(--white);
  padding: 78px 0 82px;
}
.si-hero-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 46px; align-items: center; }
.hero-kicker {
  display: inline-block; padding: 5px 13px; border-radius: 6px;
  background: rgba(202, 138, 4, 0.16); border: 1px solid rgba(202, 138, 4, 0.35);
  color: #FDE047; font-size: 12.5px; font-weight: 700; letter-spacing: 0.08em; margin-bottom: 18px;
}
.si-hero h1 { margin: 0 0 18px; font-size: clamp(30px, 4.2vw, 44px); line-height: 1.28; color: var(--white); }
.si-hero p.lead { margin: 0 0 30px; font-size: 16.5px; color: rgba(255, 255, 255, 0.8); max-width: 570px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-brief {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.hero-brief h2 { margin: 0 0 14px; font-size: 19px; color: var(--white); }
.brief-list { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 10px; font-size: 14.5px; color: rgba(255, 255, 255, 0.84); }
.brief-list strong { color: #FDE047; }
.brief-disc {
  padding: 12px 14px; border-radius: 8px;
  background: rgba(0, 0, 0, 0.25); font-size: 12.5px;
  color: rgba(255, 255, 255, 0.72); line-height: 1.6;
}

/* ===== Sections ===== */
.section { padding: 68px 0; }
.section-white { background: var(--white); border-top: 1px solid var(--slate-200); border-bottom: 1px solid var(--slate-200); }
.sec-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 34px; flex-wrap: wrap; }
.sec-kicker { display: block; font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--brass-600); margin-bottom: 6px; }
.sec-title { margin: 0; font-size: clamp(23px, 3vw, 31px); color: var(--slate-900); }
.sec-sub { margin: 6px 0 0; font-size: 15px; color: var(--slate-500); }

/* ===== 6 Financial Pillars ===== */
.pillars-6 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.pillar-card {
  background: var(--slate-50); border: 1px solid var(--slate-200);
  border-radius: var(--radius-md); padding: 24px;
  display: flex; flex-direction: column; color: var(--slate-900);
}
.pillar-card:hover { background: var(--white); border-color: var(--brass-600); box-shadow: var(--shadow-md); transform: translateY(-3px); color: var(--slate-900); }
.pillar-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.pillar-card h3 { margin: 0; font-size: 18.5px; color: var(--slate-900); }
.pillar-cnt { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 6px; background: var(--brass-50); color: var(--brass-700); border: 1px solid var(--brass-100); }
.pillar-card p { margin: 0 0 14px; font-size: 14.5px; color: var(--slate-700); flex-grow: 1; }

/* ===== Cards ===== */
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.si-card {
  background: var(--white); border: 1px solid var(--slate-200);
  border-radius: var(--radius-md); padding: 24px;
  display: flex; flex-direction: column; box-shadow: var(--shadow-sm);
  border-top: 3px solid var(--slate-200);
}
.si-card:hover { border-top-color: var(--brass-600); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.si-cat { display: inline-block; align-self: flex-start; padding: 3px 10px; border-radius: 6px; font-size: 12px; font-weight: 700; background: var(--slate-100); color: var(--slate-800); margin-bottom: 12px; }
.si-card h3 { margin: 0 0 10px; font-size: 17.5px; line-height: 1.46; color: var(--slate-900); }
.si-card h3 a { color: inherit; }
.si-card h3 a:hover { color: var(--brass-600); }
.si-excerpt { margin: 0 0 18px; font-size: 14.5px; color: var(--slate-700); flex-grow: 1; }
.si-meta { padding-top: 12px; border-top: 1px solid var(--slate-100); display: flex; justify-content: space-between; font-size: 13px; color: var(--slate-500); }

/* ===== Editors ===== */
.editors-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.ed-card { background: var(--slate-50); border: 1px solid var(--slate-200); border-radius: var(--radius-md); padding: 26px; display: flex; gap: 16px; align-items: flex-start; }
.ed-init { width: 54px; height: 54px; border-radius: 10px; background: var(--slate-900); color: #FDE047; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 18px; flex-shrink: 0; }
.ed-card h3 { margin: 0 0 4px; font-size: 18px; color: var(--slate-900); }
.ed-role { font-size: 13px; font-weight: 700; color: var(--brass-600); margin-bottom: 8px; }
.ed-card p { margin: 0; font-size: 14.5px; color: var(--slate-700); }

/* ===== Inner Pages & Prose ===== */
.inner-hero { background: linear-gradient(135deg, var(--slate-950), var(--slate-800)); color: var(--white); padding: 50px 0; }
.inner-hero .crumb { font-size: 13.5px; color: rgba(255, 255, 255, 0.72); margin-bottom: 10px; }
.inner-hero .crumb a { color: #FDE047; }
.inner-hero h1 { margin: 0 0 10px; font-size: clamp(25px, 3.5vw, 36px); color: var(--white); }
.inner-hero p { margin: 0; color: rgba(255, 255, 255, 0.82); max-width: 720px; }

.article-shell { max-width: 820px; margin: 0 auto; padding: 46px 24px 70px; }
.article-sheet { background: var(--white); border: 1px solid var(--slate-200); border-radius: var(--radius-lg); padding: 44px 42px; box-shadow: var(--shadow-sm); }
.article-head { margin-bottom: 26px; padding-bottom: 20px; border-bottom: 1px solid var(--slate-200); }
.article-head h1 { margin: 10px 0 14px; font-size: clamp(24px, 3.3vw, 33px); line-height: 1.35; color: var(--slate-900); }
.finance-notice {
  margin: 0 0 24px; padding: 14px 18px;
  background: var(--brass-50); border-left: 4px solid var(--brass-600);
  border-radius: 0 8px 8px 0; font-size: 13.5px; color: var(--slate-800);
}

.prose { font-size: 16.5px; line-height: 1.9; color: var(--slate-900); }
.prose h2 { margin: 36px 0 14px; font-size: 22.5px; color: var(--slate-900); padding-left: 12px; border-left: 3px solid var(--brass-600); }
.prose h3 { margin: 24px 0 10px; font-size: 18.5px; color: var(--slate-800); }
.prose p { margin: 0 0 18px; }
.prose ul, .prose ol { margin: 0 0 20px; padding-left: 24px; }
.prose li { margin-bottom: 8px; }
.prose a { color: var(--brass-700); text-decoration: underline; text-underline-offset: 3px; }
.prose table { width: 100%; border-collapse: collapse; margin: 22px 0; font-size: 15px; border: 1px solid var(--slate-200); display: block; overflow-x: auto; }
.prose th, .prose td { padding: 12px 15px; text-align: left; border-bottom: 1px solid var(--slate-200); }
.prose thead th { background: var(--slate-900); color: var(--white); }
.prose tbody tr:nth-child(even) { background: var(--slate-50); }

/* ===== Pagination & Footer ===== */
.pagination { margin-top: 40px; display: flex; justify-content: center; gap: 8px; }
.pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--slate-200); background: var(--white); color: var(--slate-900); font-weight: 600; font-size: 14px; }
.pagination .page-numbers.current, .pagination .page-numbers:hover { background: var(--slate-900); border-color: var(--slate-900); color: var(--white); }

.site-footer { background: var(--slate-950); color: rgba(255, 255, 255, 0.78); padding: 58px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 40px; padding-bottom: 34px; border-bottom: 1px solid rgba(255, 255, 255, 0.12); }
.footer-h { font-size: 13px; font-weight: 700; letter-spacing: 0.1em; color: #FDE047; margin: 0 0 14px; }
.footer-list { list-style: none; margin: 0; padding: 0; }
.footer-list li { margin-bottom: 9px; }
.footer-list a { color: rgba(255, 255, 255, 0.78); font-size: 14.5px; }
.footer-list a:hover { color: var(--white); }
.footer-bottom { padding-top: 22px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 13px; color: rgba(255, 255, 255, 0.56); }

@media (max-width: 1024px) {
  .si-hero-grid { grid-template-columns: 1fr; }
  .pillars-6, .cards-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .si-toggle { display: inline-flex; }
  .si-nav { display: none; position: absolute; top: 76px; left: 0; right: 0; background: var(--white); border-bottom: 1px solid var(--slate-200); padding: 14px 24px 18px; box-shadow: var(--shadow-md); }
  .si-nav.is-open { display: block; }
  .si-nav ul { flex-direction: column; align-items: stretch; }
  .pillars-6, .cards-3, .editors-2, .footer-grid { grid-template-columns: 1fr; }
  .article-sheet { padding: 26px 20px; }
  .ed-card { flex-direction: column; }
}
