/* 鐵鎧知識區:與主站同一套黑金鍛造語彙,但為純內容頁(無 3D、無捲動敘事),
   以可讀性優先。刻意獨立於 src/style.css,讓文章頁輕量、載入快、對 SEO 友善。 */
:root {
  --bg: #0c0a08;
  --panel: rgba(22, 17, 12, 0.72);
  --text: #ece5da;
  --muted: #a89c8d;
  --accent: #f5a524;
  --accent-strong: #ff7a29;
  --line: rgba(255, 235, 205, 0.09);
  --text-glow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, 'Noto Sans TC', 'Microsoft JhengHei', sans-serif;
  background-color: #090705;
  background-image: radial-gradient(90rem 60rem at 70% -10%, #241a10 0%, #0e0b08 48%, #090705 100%);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.85;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* 頁首 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem clamp(1rem, 4vw, 2.5rem);
  background: rgba(11, 13, 16, 0.72);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.brand {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text);
}

.brand:hover {
  text-decoration: none;
}

.brand span {
  margin-left: 0.35em;
  font-size: 0.8em;
  font-weight: 500;
  color: var(--muted);
}

.site-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(0.7rem, 2.5vw, 1.6rem);
}

.site-header nav a {
  color: var(--muted);
  font-size: 0.95rem;
  white-space: nowrap;
}

.site-header nav a:hover {
  color: var(--text);
  text-decoration: none;
}

.site-header nav a.active {
  color: var(--accent);
}

@media (max-width: 640px) {
  .brand span {
    display: none;
  }
}

/* 內容容器 */
.wrap {
  width: min(768px, 100%);
  margin-inline: auto;
  padding: clamp(1.5rem, 5vw, 3.5rem) clamp(1.25rem, 5vw, 2rem) 4rem;
}

.breadcrumb {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
  letter-spacing: 0.02em;
}

.breadcrumb a {
  color: var(--muted);
}

.breadcrumb a:hover {
  color: var(--accent);
}

/* 索引頁 */
.page-head {
  margin-bottom: 2.5rem;
}

.page-head h1 {
  font-size: clamp(1.9rem, 5vw, 2.6rem);
  font-weight: 800;
  letter-spacing: 0.03em;
  text-shadow: var(--text-glow);
}

.page-head p {
  margin-top: 0.9rem;
  color: var(--muted);
  max-width: 40rem;
}

.post-list {
  list-style: none;
  border-top: 1px solid var(--line);
}

.post-list li {
  border-bottom: 1px solid var(--line);
}

.post-list a.post-row {
  display: block;
  padding: 1.6rem 0.25rem;
  color: var(--text);
  transition: background 0.25s ease, padding-left 0.25s ease;
}

.post-list a.post-row:hover {
  text-decoration: none;
  background: linear-gradient(90deg, rgba(245, 165, 36, 0.08) 0%, transparent 70%);
  padding-left: 1rem;
}

.post-row__meta {
  font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace;
  font-size: 0.78rem;
  color: var(--accent);
  letter-spacing: 0.08em;
}

.post-row__title {
  display: block;
  margin: 0.4rem 0 0.5rem;
  font-size: clamp(1.15rem, 2.6vw, 1.5rem);
  font-weight: 700;
  text-shadow: var(--text-glow);
}

.post-row__excerpt {
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 46rem;
}

/* 文章頁 */
.article-head h1 {
  font-size: clamp(1.7rem, 4.5vw, 2.5rem);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: 0.02em;
  text-shadow: var(--text-glow);
}

.article-meta {
  margin-top: 1rem;
  font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.article-body {
  margin-top: 2.5rem;
  font-size: 1.02rem;
}

.article-body h2 {
  margin: 2.4rem 0 1rem;
  font-size: clamp(1.3rem, 3vw, 1.6rem);
  letter-spacing: 0.02em;
  color: var(--text);
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--line);
}

.article-body h3 {
  margin: 1.8rem 0 0.6rem;
  font-size: 1.12rem;
  color: var(--accent);
}

.article-body p {
  margin: 1rem 0;
  color: #ddd4c7;
}

.article-body ul,
.article-body ol {
  margin: 1rem 0 1rem 1.4rem;
  color: #ddd4c7;
}

.article-body li {
  margin: 0.5rem 0;
}

.article-body strong {
  color: var(--text);
}

.article-body a {
  border-bottom: 1px solid rgba(245, 165, 36, 0.5);
}

.article-body blockquote {
  margin: 1.5rem 0;
  padding: 0.8rem 1.2rem;
  border-left: 3px solid var(--accent);
  background: var(--panel);
  color: var(--muted);
}

/* 表格:文章重點,水平可捲避免撐破版面 */
.article-body table {
  display: block;
  overflow-x: auto;
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.92rem;
}

.article-body th,
.article-body td {
  border: 1px solid var(--line);
  padding: 0.7rem 0.9rem;
  text-align: left;
  vertical-align: top;
}

.article-body thead th {
  background: rgba(245, 165, 36, 0.12);
  color: var(--text);
  white-space: nowrap;
}

.article-body tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

/* FAQ */
.article-faq {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.article-faq h2 {
  font-size: 1.4rem;
  margin-bottom: 1.25rem;
  letter-spacing: 0.02em;
}

.faq-item {
  padding: 1.1rem 1.25rem;
  margin-bottom: 0.75rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.faq-item dt {
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.4rem;
}

.faq-item dd {
  color: var(--muted);
  font-size: 0.95rem;
}

/* CTA + 鍛造斜角按鈕(沿用主站語彙) */
.article-cta {
  margin-top: 3rem;
  padding: 2rem 1.75rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  text-align: center;
}

.article-cta h2 {
  font-size: 1.3rem;
  border: none;
  margin: 0 0 0.6rem;
}

.article-cta p {
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.button {
  --chamfer: 12px;
  position: relative;
  display: inline-block;
  padding: 0.75rem 1.9rem;
  font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace;
  font-size: 0.9rem;
  letter-spacing: 0.14em;
  color: #2a1600;
  font-weight: 700;
  background: var(--accent);
  clip-path: polygon(
    var(--chamfer) 0,
    100% 0,
    100% calc(100% - var(--chamfer)),
    calc(100% - var(--chamfer)) 100%,
    0 100%,
    0 var(--chamfer)
  );
}

.button:hover {
  text-decoration: none;
  background: #ffc457;
}

/* 更多文章 */
.more-posts {
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.more-posts h2 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--muted);
  letter-spacing: 0.06em;
}

.more-posts ul {
  list-style: none;
  display: grid;
  gap: 0.6rem;
}

.more-posts a {
  color: var(--text);
}

.more-posts a:hover {
  color: var(--accent);
}

/* 頁尾 */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 2.5rem clamp(1.25rem, 5vw, 2rem);
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

.site-footer a {
  color: var(--muted);
}

.site-footer .foot-contact {
  margin-bottom: 0.75rem;
}
