:root {
  --bg: #f7f5f0; --surface: #ffffff; --ink: #1f2328; --muted: #5d6470;
  --line: #e2ddd2; --accent: #7a1f2b; --accent-soft: #f3e6e7;
  --ok: #1f6b3a; --ok-bg: #e5f2e9; --warn: #8a5a00; --warn-bg: #fbf0d9;
  --bad: #8f1d1d; --bad-bg: #f8e3e3;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.85 "Noto Sans Myanmar", "Padauk", "Myanmar Text", system-ui, sans-serif;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.site-header { background: var(--accent); color: #fff; }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding-top: 12px; padding-bottom: 12px; }
.brand { color: #fff; display: flex; flex-direction: column; line-height: 1.5; }
.brand:hover { text-decoration: none; }
.brand-my { font-weight: 700; font-size: 1.2rem; }
.brand-en { font-family: "Noto Serif", Georgia, serif; font-size: .85rem; opacity: .85; letter-spacing: .03em; }
.site-header nav { display: flex; gap: 18px; }
.site-header nav a { color: #fff; opacity: .9; font-size: .95rem; }

main { padding: 24px 0 48px; }

.search-panel form { display: flex; flex-wrap: wrap; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.search-panel input[type=search] { flex: 1 1 320px; }
.search-panel input, .search-panel select, .search-panel button {
  font: inherit; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; min-height: 44px;
}
.search-panel button, .btn { background: var(--accent); color: #fff; border-color: var(--accent); cursor: pointer; }

.layout { display: grid; grid-template-columns: 260px 1fr; gap: 24px; margin-top: 24px; }
@media (max-width: 760px) { .layout { grid-template-columns: 1fr; } .categories { order: 2; } }

.categories h2, .relations h2 { font-size: 1rem; margin: 0 0 8px; color: var(--muted); }
.categories ul { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.categories li a { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; padding: 8px 12px; color: var(--ink); border-bottom: 1px solid var(--line); }
.categories li:last-child a { border-bottom: 0; }
.categories li a.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.categories .en { color: var(--muted); font-size: .8rem; }
.categories .count { margin-left: auto; color: var(--muted); font-size: .8rem; }

.result-count { color: var(--muted); margin: 0 0 12px; }
.law-row { display: flex; gap: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; margin-bottom: 10px; }
.law-meta { flex: 0 0 72px; display: flex; flex-direction: column; color: var(--muted); font-size: .85rem; }
.law-meta .year { font-family: "Noto Serif", Georgia, serif; font-size: 1.25rem; color: var(--ink); }
.law-body { min-width: 0; }
.law-body h3 { margin: 0; font-size: 1.05rem; font-weight: 600; line-height: 1.7; }
.title-en { margin: 0; color: var(--muted); font-size: .9rem; font-family: "Noto Serif", Georgia, serif; }
.tags { margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tag, .status { font-size: .75rem; padding: 1px 8px; border-radius: 99px; background: #efece5; color: var(--muted); }
.tag.pdf { background: var(--accent-soft); color: var(--accent); }
.status-in_force { background: var(--ok-bg); color: var(--ok); }
.status-amended { background: var(--warn-bg); color: var(--warn); }
.status-repealed { background: var(--bad-bg); color: var(--bad); }

.pager { display: flex; justify-content: center; align-items: center; gap: 16px; margin-top: 20px; }
.empty { color: var(--muted); padding: 24px 0; }

.crumbs { color: var(--muted); font-size: .9rem; margin: 0 0 12px; }
.law-detail, .prose { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 24px; }
.law-detail h1, .prose h1 { margin: 0; font-size: 1.5rem; line-height: 1.7; }
.law-detail .title-en { font-size: 1.05rem; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 20px; margin: 20px 0; }
.facts dt { color: var(--muted); font-size: .9rem; }
.facts dd { margin: 0; }
@media (max-width: 560px) { .facts { grid-template-columns: 1fr; } .facts dd { margin-bottom: 8px; } }
.notice.warn { background: var(--bad-bg); color: var(--bad); padding: 10px 14px; border-radius: 8px; margin-top: 16px; }
.relations ul { padding-left: 20px; }
.downloads { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.btn { display: inline-block; padding: 8px 16px; border-radius: 8px; border: 1px solid; }
.btn:hover { text-decoration: none; opacity: .9; }
.btn.secondary { background: #fff; color: var(--accent); }
.pdf-viewer { width: 100%; height: 80vh; border: 1px solid var(--line); border-radius: 8px; background: #eee; }
.hint { color: var(--muted); font-size: .85rem; }

.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; padding: 16px 0 32px; }
