:root {
  --fg: #18181b;
  --muted: #6b7280;
  --faint: #9ca3af;
  --accent: #b45309;        /* warm editorial amber */
  --accent-2: #92400e;
  --bg: #ffffff;
  --bg-soft: #faf9f7;
  --line: #eceae4;
  --radius: 14px;
  --maxw: 1080px;
  --readw: 720px;
  /* Latin font FIRST, CJK font LAST: browsers pick the first font that has each
     glyph, so English + punctuation (incl. the ’ apostrophe) render narrow from
     the Latin font and Chinese falls through to Noto — fixes the fullwidth ’. */
  --sans: -apple-system, "Helvetica Neue", Arial, "Noto Sans TC", "PingFang TC", sans-serif;
  --serif: Georgia, "Times New Roman", "Noto Serif TC", "Songti TC", serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--fg);
  background: var(--bg);
  font-size: 17px;
  line-height: 1.7;
}
img { max-width: 100%; display: block; }
a { color: inherit; }

/* ---- chrome ---- */
header.site {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.3rem 1.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
header.site .brand {
  font-family: var(--serif);
  font-weight: 900;
  font-size: 1.45rem;
  letter-spacing: .01em;
  text-decoration: none;
}
header.site nav { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
header.site nav a {
  color: var(--muted); text-decoration: none; font-size: .92rem; font-weight: 500;
  padding: .35rem .8rem; border-radius: 999px; transition: background .15s, color .15s;
}
header.site nav a:hover { color: var(--accent); background: var(--bg-soft); }
header.site nav a.active { color: #fff; background: var(--accent, #ff5722); }
main { max-width: var(--maxw); margin: 0 auto; padding: 2.4rem 1.4rem 1rem; }
footer.site {
  max-width: var(--maxw);
  margin: 4rem auto 0;
  padding: 2rem 1.4rem 3rem;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: .85rem;
}
footer.site .brand-sm { font-family: var(--serif); font-weight: 700; color: var(--muted); margin-bottom: .2rem; }

/* ---- home intro ---- */
.hero-intro { margin-bottom: 2.4rem; }
.hero-intro h1 { font-family: var(--serif); font-size: clamp(2rem, 5vw, 2.9rem); line-height: 1.2; margin: 0 0 .5rem; }
.hero-intro p { color: var(--muted); font-size: 1.05rem; margin: 0; max-width: 38rem; }
.empty { color: var(--muted); }

/* ---- thumbnails (shared) ---- */
.thumb { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg-soft); border-radius: var(--radius); }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.thumb .badge {
  position: absolute; top: .7rem; left: .7rem;
  background: var(--accent); color: #fff; font-size: .72rem; font-weight: 700;
  padding: .2rem .6rem; border-radius: 999px; letter-spacing: .05em;
}
.kicker { color: var(--faint); font-size: .82rem; margin: 0 0 .35rem; font-variant-numeric: tabular-nums; }
.kicker a { color: var(--accent); text-decoration: none; }

/* ---- featured ---- */
.featured {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 1.8rem;
  text-decoration: none;
  color: inherit;
  padding-bottom: 2.6rem;
  margin-bottom: 2.6rem;
  border-bottom: 1px solid var(--line);
  align-items: center;
}
.featured:hover .thumb img { transform: scale(1.04); }
.featured .body h2 { font-family: var(--serif); font-size: 1.85rem; line-height: 1.3; margin: .2rem 0 .6rem; }
.featured:hover .body h2 { color: var(--accent); }
.featured .excerpt { color: var(--muted); margin: 0 0 .7rem; }
.featured .spk { color: var(--faint); font-size: .85rem; margin: 0; }

/* ---- grid ---- */
ul.grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.8rem 1.6rem; }
ul.grid a { text-decoration: none; color: inherit; display: block; }
ul.grid .thumb { margin-bottom: .8rem; }
ul.grid a:hover .thumb img { transform: scale(1.04); }
ul.grid h3 { font-family: var(--serif); font-size: 1.15rem; line-height: 1.4; margin: .1rem 0 .4rem; }
ul.grid a:hover h3 { color: var(--accent); }
ul.grid .excerpt { color: var(--muted); font-size: .9rem; margin: 0; }

/* ---- post ---- */
article.post { max-width: var(--readw); margin: 0 auto; }
.post-head { margin-bottom: 1.6rem; }
.post-head h1 { font-family: var(--serif); font-size: clamp(1.8rem, 4.5vw, 2.6rem); line-height: 1.28; margin: .3rem 0 .5rem; }
.post-head .spk { color: var(--muted); font-size: .9rem; margin: 0; }
.video { aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; margin: 0 0 2rem; background: #000; }
.video iframe { width: 100%; height: 100%; border: 0; }
img.cover { width: 100%; border-radius: var(--radius); margin-bottom: 2rem; }

.prose { font-size: 1.08rem; line-height: 1.85; }
.prose > :first-child { margin-top: 0; }
.prose h2 { font-family: var(--serif); font-size: 1.5rem; margin: 2.4rem 0 .8rem; padding-left: .7rem; border-left: 4px solid var(--accent); }
.prose h3 { font-family: var(--serif); font-size: 1.2rem; margin: 1.8rem 0 .6rem; }
.prose p { margin: 1.1rem 0; }
.prose strong { color: var(--accent-2); }
.prose blockquote {
  margin: 1.6rem 0; padding: 1rem 1.3rem;
  background: var(--bg-soft); border-left: 4px solid var(--accent);
  border-radius: 0 8px 8px 0; color: #3f3f46;
}
.prose ul { padding-left: 1.3rem; }
.prose li { margin: .4rem 0; }
.prose em { color: var(--muted); }
.prose hr { border: none; border-top: 1px solid var(--line); margin: 2.6rem 0; }
.prose a { color: var(--accent); }

.tags { margin-top: 2rem; }
.chip { display: inline-block; background: var(--bg-soft); border: 1px solid var(--line); color: var(--accent-2); border-radius: 999px; padding: .2rem .75rem; margin: 0 .45rem .45rem 0; font-size: .8rem; }
.src { font-size: .82rem; color: var(--faint); word-break: break-all; margin-top: 1.2rem; }
.back { margin-top: 2.4rem; padding-top: 1.4rem; border-top: 1px solid var(--line); }
.back a { color: var(--accent); text-decoration: none; }

/* ---- responsive ---- */
@media (max-width: 820px) {
  ul.grid { grid-template-columns: repeat(2, 1fr); }
  .featured { grid-template-columns: 1fr; gap: 1rem; }
  .featured .body h2 { font-size: 1.5rem; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  ul.grid { grid-template-columns: 1fr; gap: 1.6rem; }
  main { padding-top: 1.8rem; }
}

/* category nav + chips (multi-lane: AI / 商業…) */
.cats { margin-top: 1rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.cat { display: inline-block; background: var(--accent-2, #c2410c); color: #fff; border-radius: 999px;
       padding: .25rem .85rem; font-size: .85rem; text-decoration: none; font-weight: 600; }
.cat:hover { opacity: .85; }
/* category eyebrow on a post — clean small label, not a fat pill */
.post-head .cat {
  display: inline-block; background: none; color: var(--accent); padding: 0; margin: 0 0 .3rem;
  font-size: .74rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
}
.post-head .cat:hover { opacity: .75; }
.post-head .kicker:empty { display: none; }

/* portrait reel player (our 9:16 remade videos) — keep it from going full-width */
.video-portrait { aspect-ratio: auto; max-width: 360px; margin: 0 auto 2rem; background: #000; border-radius: var(--radius); overflow: hidden; }
.video-portrait video { width: 100%; height: auto; display: block; }

/* local source-clip player — adapts to any aspect (overrides earlier .video-portrait) */
.video-local { margin: 0 auto 2rem; background: #000; border-radius: var(--radius); overflow: hidden; }
.video-local video { display: block; width: 100%; height: auto; max-height: 80vh; object-fit: contain; background: #000; }
