/* BetGuideHK - editorial dossier layout
   /css/style.css 為審計與慣例路徑；內容與 /assets/style.css 保持一致。
   版式：左側常駐檔案欄 + 右側主內容流
   主色：墨綠 #12403A / 紙白 #F6F4EF / 銅色 #A9702A */

:root {
  --ink: #14201d;
  --ink-soft: #3d4a46;
  --green: #12403a;
  --green-deep: #0c2c28;
  --green-line: #d8ddd7;
  --paper: #f6f4ef;
  --paper-alt: #eeece4;
  --copper: #a9702a;
  --copper-soft: #d9b98a;
  --rule: #d5d2c7;
  --radius: 3px;
  --serif: "Noto Serif TC", "Songti TC", "Source Han Serif TC", Georgia, "Times New Roman", serif;
  --sans: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", "Hiragino Sans", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: 0.01em;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--green); text-decoration: none; }
a:hover { color: var(--copper); text-decoration: underline; text-underline-offset: 3px; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--green-deep);
  border-bottom: 2px solid var(--copper);
}
.topbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 22px;
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: #f4f1e8;
  font-family: var(--serif);
  font-size: 1.16rem;
  letter-spacing: 0.04em;
  flex: 0 0 auto;
}
.brand:hover { color: #fff; text-decoration: none; }
.brand img {
  width: 38px;
  height: 38px;
  border-radius: 2px;
  border: 1px solid rgba(217, 185, 138, 0.55);
}
.brand small {
  display: block;
  font-family: var(--sans);
  font-size: 0.62rem;
  letter-spacing: 0.26em;
  color: var(--copper-soft);
  text-transform: uppercase;
  line-height: 1.4;
}

.nav-toggle {
  margin-left: auto;
  display: none;
  background: transparent;
  border: 1px solid rgba(217, 185, 138, 0.5);
  color: #f4f1e8;
  border-radius: var(--radius);
  padding: 8px 13px;
  font-size: 0.86rem;
  font-family: var(--sans);
  cursor: pointer;
}
.nav-toggle:active { transform: translateY(1px); }

.mainnav { margin-left: auto; display: flex; gap: 3px; flex-wrap: wrap; }
.mainnav a {
  color: #e6e2d6;
  font-size: 0.88rem;
  padding: 8px 11px;
  border-radius: var(--radius);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.mainnav a:hover { color: #fff; background: rgba(255,255,255,0.07); text-decoration: none; }
.mainnav a.is-active { color: var(--copper-soft); border-bottom-color: var(--copper); }

.shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 26px 22px 56px;
  display: grid;
  grid-template-columns: 258px minmax(0, 1fr);
  gap: 34px;
  align-items: start;
}
.dossier {
  border: 1px solid var(--rule);
  background: #fbfaf6;
  border-radius: var(--radius);
  padding: 18px 16px;
  position: sticky;
  top: 92px;
}
.dossier h2 {
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--copper);
  margin: 0 0 10px;
  font-weight: 700;
}
.dossier ul { list-style: none; margin: 0 0 18px; padding: 0; }
.dossier li { border-top: 1px solid var(--rule); }
.dossier li:first-child { border-top: 0; }
.dossier li a {
  display: block;
  padding: 8px 2px;
  font-size: 0.9rem;
  color: var(--ink-soft);
}
.dossier li a:hover { color: var(--green); text-decoration: none; padding-left: 5px; }
.dossier .stamp {
  font-size: 0.74rem;
  line-height: 1.6;
  color: #6b7168;
  border-top: 1px solid var(--rule);
  padding-top: 12px;
  margin: 0;
}
.dossier .stamp strong { color: var(--green); display: block; font-size: 0.78rem; letter-spacing: 0.06em; }

.col-main { min-width: 0; }

.kicker {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--copper);
  font-weight: 700;
  margin: 0 0 8px;
}

h1 {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 2.5vw, 2.2rem);
  line-height: 1.32;
  letter-spacing: 0.01em;
  margin: 0 0 14px;
  color: var(--green-deep);
}

h2 {
  font-family: var(--serif);
  font-size: 1.28rem;
  line-height: 1.45;
  margin: 34px 0 12px;
  padding-left: 12px;
  border-left: 3px solid var(--copper);
  color: var(--green-deep);
}

h3 {
  font-family: var(--sans);
  font-size: 1.02rem;
  margin: 22px 0 8px;
  color: var(--green);
}

p { margin: 0 0 15px; }
.col-main p, .prose p { color: #2b3633; }

.lede {
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.85;
  color: #33403c;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 16px;
  margin-bottom: 22px;
}

.crumbs {
  font-size: 0.78rem;
  color: #74796f;
  margin: 0 0 16px;
  display: block;
}
.crumbs a { color: #5b6560; }
.crumbs span { margin: 0 6px; color: #b3b0a2; }

.byline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  align-items: baseline;
  font-size: 0.8rem;
  color: #6d746a;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 10px 0;
  margin: 0 0 22px;
}
.byline b { color: var(--green); font-weight: 700; }

.prose { font-size: 1rem; line-height: 1.85; }
.prose ul, .prose ol { margin: 0 0 16px; padding-left: 22px; }
.prose li { margin-bottom: 8px; }
.prose figure { margin: 24px 0; }
.prose figure img { border: 1px solid var(--rule); border-radius: var(--radius); }
.prose figcaption { font-size: 0.76rem; color: #7b8177; margin-top: 7px; }
.prose blockquote {
  margin: 22px 0;
  padding: 12px 18px;
  border-left: 3px solid var(--green);
  background: var(--paper-alt);
  font-family: var(--serif);
  color: #2f3a36;
}
.prose blockquote p:last-child { margin-bottom: 0; }

.backlink {
  display: inline-block;
  margin-top: 26px;
  font-size: 0.85rem;
  border: 1px solid var(--green-line);
  padding: 8px 14px;
  border-radius: var(--radius);
  color: var(--green);
}
.backlink:hover { background: var(--green); color: #f6f4ef; text-decoration: none; }

.article-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 262px;
  gap: 30px;
  align-items: start;
}
.rail { border-left: 1px solid var(--rule); padding-left: 20px; }
.rail h2 {
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--copper);
  border-left: 0;
  padding-left: 0;
  margin: 0 0 12px;
}
.rail ol { list-style: none; margin: 0; padding: 0; counter-reset: rail; }
.rail li { counter-increment: rail; border-top: 1px solid var(--rule); padding: 11px 0; }
.rail li:first-child { border-top: 0; }
.rail li a { font-size: 0.88rem; line-height: 1.55; display: block; color: var(--ink-soft); }
.rail li a::before {
  content: counter(rail, decimal-leading-zero);
  display: block;
  font-family: var(--sans);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  color: var(--copper);
  margin-bottom: 3px;
}
.rail li a:hover { color: var(--green); text-decoration: none; }
.rail .rail-note { font-size: 0.76rem; color: #7b8177; border-top: 1px solid var(--rule); padding-top: 12px; margin-top: 6px; }

.masthead {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 30px;
  align-items: center;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--rule);
}
.masthead .mh-copy h1 { margin-bottom: 12px; }
.masthead .mh-copy p { font-size: 0.97rem; color: #33403c; margin-bottom: 16px; }
.masthead figure { margin: 0; }
.masthead figure img { border-radius: var(--radius); border: 1px solid var(--rule); }

.pill-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pill-row a {
  font-size: 0.8rem;
  border: 1px solid var(--green-line);
  background: #fbfaf6;
  color: var(--green);
  padding: 6px 12px;
  border-radius: 999px;
}
.pill-row a:hover { border-color: var(--copper); color: var(--copper); text-decoration: none; }

.strip {
  margin-top: 30px;
  border: 1px solid var(--rule);
  border-left: 4px solid var(--green);
  background: #fbfaf6;
  border-radius: var(--radius);
  padding: 18px 20px;
}
.strip h2 {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--copper);
  border-left: 0;
  padding-left: 0;
  margin: 0 0 12px;
}
.strip-rows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 26px; }
.strip-rows a {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: baseline;
  font-size: 0.9rem;
  border-top: 1px solid var(--rule);
  padding: 9px 0;
  color: var(--ink-soft);
}
.strip-rows a:first-child, .strip-rows a:nth-child(2) { border-top: 0; }
.strip-rows a em { font-style: normal; font-size: 0.72rem; color: var(--copper); white-space: nowrap; }
.strip-rows a:hover { color: var(--green); text-decoration: none; }

.ledger { margin-top: 34px; }
.ledger > h2 {
  font-family: var(--serif);
  font-size: 1.24rem;
  border-left: 0;
  padding-left: 0;
  margin: 0 0 4px;
}
.ledger > .sub { font-size: 0.82rem; color: #7b8177; margin: 0 0 16px; }
.ledger-list { border-top: 2px solid var(--green); }
.ledger-item {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--rule);
}
.ledger-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--rule);
}
.ledger-item h3 {
  font-family: var(--serif);
  font-size: 1.08rem;
  margin: 0 0 6px;
  line-height: 1.5;
}
.ledger-item h3 a { color: var(--green-deep); }
.ledger-item p { font-size: 0.88rem; color: #55605b; margin: 0 0 8px; }
.ledger-item .tag { font-size: 0.72rem; color: var(--copper); letter-spacing: 0.08em; }

.tile-shift {
  margin-top: 34px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 0;
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}
.tile-shift a {
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 18px;
  background: #fbfaf6;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tile-shift a:first-child { grid-row: span 2; justify-content: flex-end; background: var(--green-deep); color: #f1eee4; }
.tile-shift a:hover { text-decoration: none; background: var(--paper-alt); }
.tile-shift a:first-child:hover { background: #0a2521; }
.tile-shift .t-kicker { font-size: 0.68rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--copper); }
.tile-shift a:first-child .t-kicker { color: var(--copper-soft); }
.tile-shift .t-title { font-family: var(--serif); font-size: 1rem; line-height: 1.45; color: var(--green-deep); }
.tile-shift a:first-child .t-title { font-size: 1.32rem; color: #f6f4ef; }
.tile-shift .t-desc { font-size: 0.82rem; color: #6b7168; }
.tile-shift a:first-child .t-desc { color: #c8c9bd; }

.noteband {
  margin-top: 34px;
  padding: 24px 22px;
  background: var(--paper-alt);
  border-radius: var(--radius);
  border: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
}
.noteband h2 {
  font-family: var(--serif);
  font-size: 1.1rem;
  border-left: 3px solid var(--copper);
  padding-left: 12px;
  margin: 0;
}
.noteband ul { margin: 0; padding-left: 20px; font-size: 0.9rem; color: #3d4a46; }
.noteband li { margin-bottom: 7px; }

.faq-slab { margin-top: 34px; }
.faq-slab h2 { border-left: 0; padding-left: 0; margin-bottom: 14px; }
.faq-slab details {
  border-top: 1px solid var(--rule);
  padding: 12px 0;
}
.faq-slab details:last-of-type { border-bottom: 1px solid var(--rule); }
.faq-slab summary {
  cursor: pointer;
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--green-deep);
  list-style: none;
}
.faq-slab summary::-webkit-details-marker { display: none; }
.faq-slab summary::before { content: "+"; color: var(--copper); margin-right: 9px; font-family: var(--sans); }
.faq-slab details[open] summary::before { content: "-"; }
.faq-slab details p { margin: 9px 0 0 20px; font-size: 0.91rem; color: #4a5551; }

.cat-head {
  border-bottom: 2px solid var(--green);
  padding-bottom: 16px;
  margin-bottom: 8px;
}
.cat-head p { font-size: 0.94rem; color: #4a5551; margin: 0; max-width: 68ch; }
.cat-list { list-style: none; margin: 0; padding: 0; }
.cat-list li { border-bottom: 1px solid var(--rule); padding: 18px 0; }
.cat-list h3 { font-family: var(--serif); font-size: 1.06rem; margin: 0 0 5px; }
.cat-list h3 a { color: var(--green-deep); }
.cat-list p { font-size: 0.88rem; color: #5c665f; margin: 0; }
.cat-list .meta { font-size: 0.74rem; color: var(--copper); letter-spacing: 0.06em; margin-top: 6px; }

.sitefoot {
  background: var(--green-deep);
  color: #cfd3c8;
  margin-top: 20px;
  border-top: 3px solid var(--copper);
}
.foot-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 34px 22px 26px;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1.2fr;
  gap: 30px;
}
.sitefoot h3 {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--copper-soft);
  margin: 0 0 10px;
  font-family: var(--sans);
}
.sitefoot p, .sitefoot li { font-size: 0.82rem; line-height: 1.8; margin: 0 0 5px; }
.sitefoot ul { list-style: none; margin: 0; padding: 0; }
.sitefoot a { color: #e2ddd0; }
.sitefoot a:hover { color: #fff; }
.foot-legal {
  border-top: 1px solid rgba(217,185,138,0.22);
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 22px 26px;
  font-size: 0.76rem;
  color: #a9b0a4;
}
.foot-legal p { margin: 0 0 4px; }
.foot-legal a { color: #c4cabb; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

@media (max-width: 1080px) {
  .article-grid { grid-template-columns: minmax(0, 1fr); }
  .rail { border-left: 0; border-top: 1px solid var(--rule); padding-left: 0; padding-top: 18px; }
  .rail ol { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 22px; }
  .tile-shift { grid-template-columns: 1fr 1fr; }
  .tile-shift a:first-child { grid-row: span 1; grid-column: span 2; }
}

@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); gap: 22px; padding: 18px 16px 40px; }
  .dossier { position: static; }
  .masthead { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .foot-inner { grid-template-columns: minmax(0, 1fr); gap: 22px; padding: 26px 16px 20px; }
  .foot-legal { padding: 14px 16px 24px; }
}

@media (max-width: 768px) {
  .topbar-inner { flex-wrap: wrap; padding: 10px 16px; gap: 10px; min-height: 0; }
  .nav-toggle { display: block; margin-left: auto; }
  .mainnav {
    display: none;
    width: 100%;
    margin-left: 0;
    flex-direction: column;
    gap: 0;
    border-top: 1px solid rgba(217,185,138,0.3);
    padding-top: 8px;
  }
  .mainnav.is-open { display: flex; }
  .mainnav a { padding: 11px 4px; border-bottom: 1px solid rgba(255,255,255,0.08); border-radius: 0; }
  .mainnav a.is-active { border-bottom-color: rgba(217,185,138,0.5); }
  .strip-rows { grid-template-columns: minmax(0, 1fr); }
  .strip-rows a:nth-child(2) { border-top: 1px solid var(--rule); }
  .ledger-item { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .tile-shift { grid-template-columns: minmax(0, 1fr); }
  .tile-shift a:first-child { grid-column: span 1; }
  .noteband { grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 18px 16px; }
  .rail ol { grid-template-columns: minmax(0, 1fr); }
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.14rem; }
  .prose { font-size: 0.97rem; }
}
