:root {
  --ink: #0f172a; --ink-2: #334155; --muted: #64748b; --line: #e2e8f0;
  --surface: #ffffff; --surface-2: #f6f8fa;
  --brand: #00c8e1; --brand-ink: #007c8f; --brand-soft: #e6f9fc;
  --dark: #0d1117; --dark-line: #26303b; --dark-text: #e6edf3; --dark-muted: #9aa7b4;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(15,23,42,.04), 0 8px 24px rgba(15,23,42,.06);
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--surface-2); color: var(--ink);
  font-family: 'IBM Plex Sans Thai', system-ui, sans-serif; font-size: 17px; line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
html.en .th, html:not(.en) .en { display: none !important; }
a { color: var(--brand-ink); }
img { max-width: 100%; height: auto; display: block; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 820px; }

/* nav (same as the home page) */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(13,17,23,.92); backdrop-filter: saturate(160%) blur(10px); border-bottom: 1px solid var(--dark-line); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 20px; }
.nav .brand img { height: 30px; }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a.plain { color: var(--dark-muted); text-decoration: none; font-size: 15px; font-weight: 500; }
.nav-links a.plain:hover, .nav-links a.plain[aria-current="page"] { color: #fff; }
.lang { background: transparent; border: 1px solid var(--dark-line); color: var(--dark-muted); border-radius: 999px; padding: 3px 12px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.lang:hover { color: #fff; border-color: var(--dark-muted); }
.btn { display: inline-flex; align-items: center; gap: 8px; font: inherit; font-weight: 600; font-size: 15px; text-decoration: none; padding: 8px 16px; border-radius: 10px; background: var(--brand); color: #04252b; }
.btn:hover { background: #2fd6ea; }

/* page head */
.page-head { background: linear-gradient(180deg, #0d1117, #121a24); color: var(--dark-text); padding: 56px 0 48px; }
.page-head .kicker { display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--brand); margin-bottom: 8px; }
.page-head h1 { font-size: clamp(28px, 3.6vw, 40px); line-height: 1.3; margin: 0 0 10px; color: #fff; }
.page-head p { margin: 0; color: var(--dark-muted); font-size: 18px; }
.crumbs { font-size: 14px; margin-bottom: 14px; }
.crumbs a { color: var(--dark-muted); text-decoration: none; }
.crumbs a:hover { color: var(--brand); }

main { padding: 44px 0 72px; }

/* list */
.news-list { display: grid; gap: 20px; }
.news-card { display: grid; grid-template-columns: 320px 1fr; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; text-decoration: none; color: inherit; transition: border-color .15s, transform .15s; }
.news-card:hover { border-color: var(--brand); transform: translateY(-2px); }
/* The image sits absolutely inside its own box, so no browser can stretch it over the text
   (Safari resolves height: 100% inside grid rows differently from Chrome). */
.news-card .thumb { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #0d1117; }
.news-card .thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.news-card .body { min-width: 0; }
.news-card .body { padding: 22px 26px; }
.news-card h2 { font-size: 21px; line-height: 1.4; margin: 6px 0 8px; color: var(--ink); }
.news-card p { margin: 0; color: var(--ink-2); font-size: 16px; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: 14px; color: var(--muted); }
.tag { display: inline-block; font-size: 12.5px; font-weight: 600; padding: 2px 10px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-ink); }
.tag.award { background: #fff4d6; color: #8a5a00; }

/* article */
article.news { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
article.news figure { margin: 0; }
article.news figcaption { font-size: 14px; color: var(--muted); padding: 10px 28px 0; }
article.news .content { padding: 22px 28px 30px; }
article.news .content p { margin: 0 0 16px; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 6px 0 22px; padding: 16px 20px; background: var(--surface-2); border-radius: 12px; font-size: 16px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 500; }
blockquote { margin: 0 0 18px; padding: 14px 20px; border-left: 4px solid var(--brand); background: var(--surface-2); border-radius: 0 12px 12px 0; color: var(--ink-2); }
blockquote p:last-child { margin-bottom: 0; }
.gallery { margin: 8px 0 22px; }
.gallery h2 { font-size: 20px; margin: 0 0 12px; }
.gallery .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: contain; background: #0d1117; border-radius: 10px; border: 1px solid var(--line); }
article.news .gallery figcaption { padding: 0; font-size: 13.5px; color: var(--muted); margin-top: 6px; line-height: 1.5; }
.source { font-size: 14.5px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 16px; margin-top: 8px; }

footer { background: var(--dark); color: var(--dark-muted); border-top: 1px solid var(--dark-line); padding: 30px 0; font-size: 14.5px; }
footer .wrap { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
footer img { height: 26px; }
footer a { color: var(--dark-text); text-decoration: none; }
footer a:hover { color: var(--brand); }

@media (max-width: 760px) {
  .nav-links a.plain { display: none; }
  .nav-links { gap: 12px; }
  .news-card { grid-template-columns: 1fr; }
  article.news .content { padding: 20px; }
  article.news figcaption { padding: 10px 20px 0; }
  .facts { grid-template-columns: 1fr; gap: 0; }
  .facts dd { margin-bottom: 8px; }
}

/* generated news pages */
.video { position: relative; aspect-ratio: 16 / 9; margin: 6px 0 22px; border-radius: 12px; overflow: hidden; background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.news-card .noimg { background: linear-gradient(135deg, #0d1117, #16303a); }
.news-card .noimg img { inset: 0; margin: auto; width: 55%; height: auto; object-fit: contain; }
@media (min-width: 761px) { .news-card .thumb { aspect-ratio: auto; min-height: 190px; } }
.note-muted { font-size: 15px; color: var(--muted); background: var(--surface-2); border-radius: 10px; padding: 10px 14px; }
.gallery a { display: block; }

/* long-form articles */
article.news .content h2 { font-size: 21px; line-height: 1.4; margin: 26px 0 10px; }
article.news .content ul { margin: 0 0 16px; padding-left: 22px; }
article.news .content li { margin-bottom: 6px; }
