:root {
  color-scheme: light;
  --navy: #172641;
  --terracotta: #993300;
  --terracotta-soft: #fdf3eb;
  --slate-blue: #3b6b94;
  --slate-blue-soft: #edf4fa;
  --emerald: #1b6a4f;
  --emerald-soft: #e8f6ef;
  --crimson: #b42318;
  --crimson-soft: #fef2f2;
  --amber: #94560f;
  --amber-soft: #fef6e4;
  --ink: #172641;
  --body: #334155;
  --green: #1b6a4f;
  --line: #dce5ef;
  --line-strong: #c2d1e0;
  --muted: #5f7285;
  --bg: #f3f6fa;
  --paper: #ffffff;
  --link: #1c4e80;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 2px 12px rgba(23, 38, 65, 0.05);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font: 15.5px/1.66 "Noto Sans Thai", "IBM Plex Sans Thai", "Leelawadee UI", system-ui, sans-serif;
}
.masthead {
  position: sticky; top: 0; z-index: 60;
  background: linear-gradient(135deg, var(--navy) 0%, #21375c 100%);
  color: #fff; border-bottom: 3px solid var(--terracotta);
  box-shadow: 0 4px 16px rgba(15, 27, 48, 0.14);
}
.masthead-inner, main { width: min(1140px, calc(100% - 2rem)); margin: auto; }
.masthead-inner {
  padding: .7rem 0; display: flex; flex-wrap: wrap; gap: .5rem 1rem;
  align-items: center; justify-content: space-between;
}
.masthead-brand { display: flex; flex-direction: column; gap: 1px; }
.masthead-brand strong { font-size: 1.02rem; color: #fff; }
.masthead-brand span { font-size: .73rem; color: #cdd9ea; }
.masthead nav { display: flex; flex-wrap: wrap; gap: .36rem; }
.masthead a {
  display: inline-flex; align-items: center; gap: .34rem;
  color: #e8f0fa; text-decoration: none; font-size: .8rem; font-weight: 600;
  padding: .32rem .68rem; border-radius: 99px;
  background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.16);
}
.masthead a:hover { background: rgba(255,255,255,.2); color: #fff; }
.masthead a[aria-current="page"] { background: #fff; color: var(--navy); border-color: #fff; }

main { padding-block: 1.35rem 3.5rem; }
h1, h2, h3 { margin: .35rem 0; line-height: 1.36; color: var(--navy); }
h1 { font-size: clamp(1.45rem, 3vw, 2rem); letter-spacing: -.012em; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
p, ul, ol { margin: .45rem 0; }
ul, ol { padding-inline-start: 1.4rem; }
a { color: var(--link); text-underline-offset: .2em; }
a:hover { color: var(--terracotta); }

.layout { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: .95rem; align-items: start; }
section, details {
  border: 1px solid var(--line);
  padding: 1rem 1.15rem;
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
  margin: .85rem 0;
  min-width: 0;
  overflow-wrap: anywhere;
}
.layout > section {
  margin: 0;
  max-height: 360px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #9cb3c9 #eef3f8;
}
.reply {
  border-left: 3.5px solid var(--emerald);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: .68rem .92rem;
  background: var(--emerald-soft);
  color: var(--navy);
  font-weight: 500;
  white-space: pre-wrap;
}
.warning {
  color: var(--amber);
  border-left: 3.5px solid var(--amber);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: .55rem .85rem;
  background: var(--amber-soft);
  list-style: none;
  margin-left: -1.4rem;
}
small, .meta { color: var(--muted); font-size: .84rem; }
:focus-visible, :target { outline: 2.5px solid var(--terracotta); outline-offset: 2px; }
.record {
  margin-block: .65rem;
  padding: .65rem .8rem;
  border: 1px solid var(--line);
  border-left: 3px solid var(--slate-blue);
  border-radius: var(--radius-sm);
  background: #f8fafd;
}
.record:last-child { margin-bottom: 0; }
@media (max-width: 780px) {
  .layout { grid-template-columns: 1fr; gap: .85rem; }
}
