@charset "UTF-8";

:root {
  color-scheme: light;
  --paper: #f5f5f0;
  --white: #fff;
  --ink: #24352f;
  --muted: #69736c;
  --line: #e0e3db;
  --green: #315c48;
  --green-soft: #e9efe7;
  --orange: #b64e2a;
  --orange-soft: #f9eee5;
  font-family: "Noto Sans Thai", "Thonburi", "Tahoma", system-ui, sans-serif;
  font-size: 14px;
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); line-height: 1.65; }
button, input, select { font: inherit; }
button, a, select, summary { -webkit-tap-highlight-color: transparent; }
button, select, summary { cursor: pointer; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 4px; }
button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--orange); outline-offset: 4px; }
button:disabled { cursor: wait; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
.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; }
.skip-link { position: fixed; left: 20px; top: -80px; padding: 10px 18px; background: var(--ink); color: white; z-index: 20; }
.skip-link:focus { top: 12px; }
.topbar { height: 68px; margin: 0 auto; padding: 0 38px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 11px; font: 700 12px/1.1 system-ui, sans-serif; letter-spacing: 1.1px; }
.brand-mark { font: 36px/1 Georgia, serif; color: var(--green); margin-top: -5px; }
.brand-divider { color: #a0a89e; font-weight: 400; margin: 0 6px; }
.brand-section { font-weight: 450; letter-spacing: 1.5px; }
.back-link { font-size: 12px; color: var(--muted); }
.back-link span { margin-left: 8px; }
main { max-width: 1420px; padding: 30px 38px 0; margin: auto; }
.intro { display: flex; justify-content: space-between; align-items: center; gap: 30px; margin-bottom: 25px; }
.eyebrow { font-size: 10px; font-weight: 600; letter-spacing: 1.2px; color: var(--muted); }
.intro .eyebrow { font-size: 11px; letter-spacing: .7px; }
.square { display: inline-block; width: 7px; height: 7px; background: var(--orange); margin-right: 7px; }
h1 { font-size: clamp(25px, 2.65vw, 36px); font-weight: 650; letter-spacing: -1.05px; line-height: 1.55; margin: 6px 0 3px; }
h1 span { font-weight: 400; color: var(--green); }
.intro-copy { font-size: 13px; color: var(--muted); }
.snapshot-meta { flex-shrink: 0; display: flex; flex-direction: column; text-align: right; font-size: 11px; color: var(--muted); gap: 2px; }
.snapshot-meta strong { font-size: 17px; font-weight: 550; color: var(--ink); }
.snapshot-label { font-size: 10px; letter-spacing: .2px; }
.findings { display: grid; grid-template-columns: 1.04fr 1fr 1fr; gap: 13px; }
.finding { padding: 17px 21px 15px; border: 1px solid var(--line); border-radius: 7px; background: #fafbf7; text-align: left; display: flex; flex-direction: column; min-height: 170px; transition: border-color .15s, background .15s; }
.finding:hover { border-color: #9eac9e; background: white; }
.finding-label { display: flex; justify-content: space-between; align-items: center; font-size: 10px; color: var(--muted); gap: 10px; }
.finding-label > span { font-size: 17px; line-height: 1; }
.finding-body { display: flex; align-items: center; gap: 21px; flex: 1; padding-top: 4px; }
.finding-number { font: 450 54px/1.2 system-ui, sans-serif; letter-spacing: -3px; }
.finding-number > span { font-size: 24px; letter-spacing: -1px; opacity: .5; }
.finding-body b { display: block; font-size: 19px; font-weight: 550; }
.finding-body small { font-size: 11px; opacity: .7; }
.finding-foot { font-size: 11px; color: var(--muted); margin-top: 10px; }
.finding-primary { background: var(--green); color: white; border-color: var(--green); }
.finding-primary:hover { background: #244d3a; border-color: #244d3a; }
.finding-primary .finding-label, .finding-primary .finding-foot { color: #d1ddce; }
.finding-title { font-size: 21px; font-weight: 550; line-height: 1.6; padding-top: 15px; flex: 1; }
.finding-title em { font-size: 17px; color: var(--orange); font-style: normal; font-weight: 450; }
.finding-title .muted-em { color: var(--muted); font-size: 16px; }
.scope-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 20px; margin: 17px 0 25px; font-size: 11px; color: var(--muted); }
.scope-bar strong { color: var(--ink); font: 650 14px/1 system-ui, sans-serif; padding-right: 3px; }
.scope-bar p span { margin: 0 7px; }
.scope-bar > span { font-size: 10px; }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 344px; gap: 20px; align-items: start; }
.comparison { min-width: 0; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 17px; }
h2 { font-size: 22px; font-weight: 550; line-height: 1.55; }
.section-heading .eyebrow { font-size: 9px; letter-spacing: 1.4px; margin-bottom: 2px; }
.download-link { font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 5px; padding: 6px 10px; background: #fcfcf8; white-space: nowrap; }
.download-link span { padding-left: 8px; }
.group-tabs { display: flex; border-bottom: 1px solid var(--line); gap: 22px; overflow-x: auto; }
.group-tab { flex-shrink: 0; border: 0; border-bottom: 2px solid transparent; background: none; padding: 0 0 11px; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.group-tab[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--green); font-weight: 650; }
.group-tab span { background: #e7e9e1; border-radius: 4px; font: 500 10px/1 system-ui, sans-serif; padding: 4px 5px; min-width: 20px; text-align: center; }
.group-tab[aria-pressed="true"] span { background: var(--green); color: white; }
.filters { display: grid; grid-template-columns: minmax(100px, 1fr) 142px 122px; gap: 8px; margin: 16px 0 10px; }
.filters label { min-width: 0; }
.filters input, .filters select { width: 100%; min-width: 0; height: 37px; border: 1px solid var(--line); border-radius: 5px; background: #fcfcf9; padding: 0 10px; font-size: 11px; color: var(--ink); }
.filters input::placeholder { color: var(--muted); }
.search-field { position: relative; }
.search-field input { padding-left: 33px; }
.search-field svg { position: absolute; width: 15px; height: 15px; top: 11px; left: 10px; fill: none; stroke: var(--muted); stroke-width: 1.5; pointer-events: none; }
.table-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 15px; color: var(--muted); font-size: 10px; min-height: 32px; }
.table-meta p { max-width: 85%; }
#result-count { white-space: nowrap; font-variant-numeric: tabular-nums; }
.table-scroll { position: relative; overflow: auto; max-height: 542px; border: 1px solid var(--line); border-radius: 5px; background: #fcfcf9; scrollbar-width: thin; scrollbar-color: #c4ccbf transparent; }
table { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; min-width: 648px; text-align: center; }
th { background: #eeefe8; padding: 11px 0; color: var(--muted); font-size: 9px; font-weight: 500; position: sticky; top: 0; z-index: 1; border-bottom: 1px solid var(--line); }
th.name-heading { width: 37%; text-align: left; padding-left: 17px; }
th.total-heading { width: 49px; color: var(--ink); }
th abbr { cursor: help; text-decoration: none; }
td { border-bottom: 1px solid #e9ece3; height: 58px; vertical-align: middle; padding: 4px 0; }
tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .1s; }
tbody tr:hover { background: #f1f4eb; }
tbody tr.selected { background: var(--green-soft); }
td.case-name { padding: 0; text-align: left; border-left: 3px solid transparent; }
.selected td.case-name { border-left-color: var(--green); }
.case-button { width: 100%; background: none; border: 0; padding: 9px 8px 9px 13px; text-align: left; display: flex; gap: 9px; align-items: center; min-height: 57px; }
.row-rank { font: 400 11px/1 system-ui, sans-serif; color: #86907f; min-width: 14px; }
.case-button .row-text { min-width: 0; }
.row-name { display: block; font-size: 11px; font-weight: 550; line-height: 1.5; }
.row-location { display: block; font-size: 9px; color: var(--muted); margin-top: 1px; }
.evidence-dot { display: inline-flex; align-items: center; justify-content: center; width: 13px; height: 13px; border-radius: 4px; background: #58815c; vertical-align: middle; }
.evidence-dot.food-dot { background: #c0744b; }
.unknown-dash { display: inline-block; color: #c3c9be; font-size: 11px; font-style: normal; }
.cell-score { font: 600 15px/1 system-ui, sans-serif; color: var(--green); }
.cell-score.unscored { color: var(--muted); font-weight: 400; }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 15px; padding-top: 12px; font-size: 9px; color: var(--muted); }
.legend > span { display: inline-flex; align-items: center; gap: 5px; }
.legend .evidence-dot { width: 8px; height: 8px; border-radius: 2px; }
.legend .legend-hint { margin-left: auto; }
.comparison-note { margin-top: 9px; font-size: 9px; color: var(--muted); }
.detail { background: white; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; position: sticky; top: 18px; }
.detail-top { padding: 20px 21px 16px; background: #fafbf7; border-bottom: 1px solid var(--line); }
.detail-kicker { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.detail-kicker .eyebrow { font: 500 9px/1.6 system-ui, sans-serif; letter-spacing: 1.5px; }
.detail-score { background: var(--green-soft); color: var(--green); font-size: 10px; padding: 3px 7px; border-radius: 4px; }
.detail h2 { font-size: 22px; letter-spacing: -.4px; outline-offset: 3px; }
.detail-location { font-size: 11px; color: var(--muted); margin-top: 5px; }
.detail-body { padding: 18px 21px 20px; max-height: 642px; overflow-y: auto; scrollbar-width: thin; }
.fact-summary { font-size: 12px; line-height: 1.85; margin-bottom: 14px; }
.food-note { padding: 10px 12px; background: var(--orange-soft); border-left: 2px solid #c0744b; border-radius: 0 4px 4px 0; margin-bottom: 17px; font-size: 10px; line-height: 1.8; }
.food-note strong { display: block; color: var(--orange); font-size: 10px; margin-bottom: 2px; }
.detail-section-title { color: var(--muted); font-size: 10px; font-weight: 550; margin-bottom: 8px; }
.evidence-list { margin: 0; padding: 0; list-style: none; }
.evidence-list li { display: grid; grid-template-columns: 7px 1fr; gap: 10px; padding: 7px 0; font-size: 11px; line-height: 1.8; border-bottom: 1px solid #f0f1eb; }
.evidence-list li > i { margin-top: 6px; width: 6px; height: 6px; border-radius: 2px; background: #58815c; }
.evidence-list li[data-dimension="F"] > i { background: #c0744b; }
.evidence-list b { font-size: 10px; font-weight: 600; display: block; }
.citation { display: inline; margin-left: 3px; color: var(--green); font: 550 9px/1.5 system-ui, sans-serif; text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
.caveat { font-size: 10px; color: var(--muted); background: #f6f7f1; border-radius: 4px; padding: 9px 11px; margin-top: 14px; line-height: 1.8; }
.detail-fold { border-top: 1px solid var(--line); margin-top: 17px; padding-top: 12px; }
.detail-fold summary { font-size: 11px; font-weight: 550; }
.detail-fold summary::marker, .methodology summary::marker { color: var(--muted); }
.detail-fold p { font-size: 11px; margin-top: 11px; line-height: 1.8; }
.detail-fold p b { display: block; font-size: 10px; color: var(--muted); margin-bottom: 3px; }
.source-list { padding: 0; margin: 0; list-style: none; }
.source-list li { padding: 12px 0; border-bottom: 1px solid #f0f1eb; }
.source-list li:last-child { border: 0; padding-bottom: 0; }
.source-meta { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 9px; }
.source-id { font: 500 8px/1.2 system-ui, sans-serif; background: var(--green-soft); color: var(--green); padding: 3px 4px; border-radius: 3px; }
.source-link { display: block; font-size: 11px; line-height: 1.7; padding-top: 4px; }
.source-list .source-access { font-size: 9px; margin-top: 5px; color: var(--muted); }
.source-list .source-caveat { font-size: 9px; color: var(--muted); margin-top: 4px; }
.detail-placeholder { padding: 24px; color: var(--muted); }
.detail-placeholder h2 { margin: 14px 0 8px; font-size: 19px; }
.detail-placeholder p:last-child { font-size: 12px; }
.empty-state { text-align: center; padding: 42px 20px; }
.empty-symbol { font-size: 30px; color: var(--muted); }
.empty-state h3 { font-size: 15px; font-weight: 550; margin-top: 4px; }
.empty-state p { color: var(--muted); font-size: 12px; margin: 6px 0 15px; }
.text-button { border: 0; background: none; color: var(--green); padding: 6px 0; font-size: 12px; font-weight: 550; text-decoration: underline; text-underline-offset: 4px; }
.load-error { padding: 20px; background: var(--orange-soft); border: 1px solid #edcfb9; border-radius: 5px; font-size: 12px; }
.load-error p { padding: 6px 0; }
.methodology { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: 27px; padding: 15px 0; }
.methodology summary { font-size: 12px; }
.methodology summary span { color: var(--muted); margin-left: 14px; font-size: 10px; }
.method-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; padding: 17px 0 4px; }
.method-grid p { font-size: 11px; color: var(--muted); line-height: 1.9; }
.method-grid b { display: block; color: var(--ink); margin-bottom: 4px; }
footer { display: flex; justify-content: space-between; gap: 15px; padding: 18px 0 24px; color: var(--muted); font-size: 10px; }
footer > span > span { margin: 0 10px; opacity: .5; }
footer nav { display: flex; gap: 22px; }
dialog { width: min(550px, calc(100% - 32px)); max-height: 90dvh; overflow: auto; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); color: var(--ink); padding: 26px; box-shadow: 0 18px 80px #14281d33; }
dialog::backdrop { background: #24352f75; backdrop-filter: blur(3px); }
.dialog-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.close-button { width: 32px; height: 32px; border: 1px solid var(--line); background: none; border-radius: 50%; font: 22px/1 system-ui; }
.dialog-intro { font-size: 12px; color: var(--muted); margin-top: 9px; }
dialog section { border-top: 1px solid var(--line); margin-top: 22px; padding-top: 20px; }
dialog h3 { font-size: 18px; font-weight: 550; margin: 8px 0; }
dialog section p { font-size: 12px; line-height: 1.9; }
.status-tag { font-size: 10px; color: var(--orange); background: var(--orange-soft); padding: 4px 7px; border-radius: 3px; }
.research-prompt { margin-top: 12px; color: var(--muted); }
.research-prompt b { color: var(--ink); }

@media (min-width: 1500px) { .workspace { grid-template-columns: minmax(0, 1fr) 370px; } }
@media (max-width: 1150px) {
  .topbar { padding: 0 24px; }
  main { padding: 24px 24px 0; }
  .workspace { grid-template-columns: minmax(0, 1fr) 310px; gap: 16px; }
  .finding { padding: 15px; }
  .finding-title { font-size: 18px; }
  .finding-body { gap: 15px; }
  .finding-body b { font-size: 17px; }
  .group-tabs { gap: 16px; }
  .filters { grid-template-columns: minmax(100px, 1fr) 115px 110px; }
  .table-meta { min-height: 42px; }
  .detail-top, .detail-body { padding-left: 17px; padding-right: 17px; }
  .legend .legend-hint { display: none; }
}
@media (max-width: 900px) {
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .detail { position: static; scroll-margin-top: 16px; }
  .detail-body { max-height: none; }
  .detail-top { padding: 19px 22px; }
  .detail-body { padding: 20px 22px; }
  .evidence-list { display: grid; grid-template-columns: repeat(2, 1fr); column-gap: 25px; }
  .finding-title { font-size: 17px; }
  .finding-title em, .finding-title .muted-em { font-size: 14px; }
  .finding-number { font-size: 45px; }
  .finding-body { gap: 12px; }
  .finding-body b { font-size: 16px; }
  .finding-label, .finding-foot { font-size: 9px; }
  .table-meta { min-height: 30px; }
}
@media (max-width: 620px) {
  .topbar { height: 56px; padding: 0 18px; }
  .brand { gap: 7px; font-size: 10px; }
  .brand-mark { font-size: 29px; }
  .brand-divider { margin: 0 1px; }
  .brand-section { font-size: 8px; letter-spacing: .5px; }
  .back-link { font-size: 0; }
  .back-link span { font-size: 18px; }
  main { padding: 23px 17px 0; }
  .intro { display: block; margin-bottom: 18px; }
  h1 { font-size: 27px; letter-spacing: -.9px; line-height: 1.5; margin: 10px 0 7px; }
  h1 span { display: block; }
  .intro-copy { font-size: 12px; max-width: 310px; }
  .snapshot-meta { text-align: left; flex-direction: row; align-items: baseline; flex-wrap: wrap; gap: 3px 10px; margin-top: 15px; }
  .snapshot-meta strong { font-size: 12px; font-weight: 550; }
  .snapshot-label { display: none; }
  .snapshot-meta > span:last-child { font-size: 9px; }
  .findings { grid-template-columns: 1fr 1fr; gap: 10px; }
  .finding { padding: 13px; min-height: 158px; }
  .finding-primary { grid-column: 1 / -1; min-height: 144px; }
  .finding-primary .finding-label, .finding-primary .finding-foot { font-size: 10px; }
  .finding-primary .finding-body { gap: 23px; padding-top: 5px; }
  .finding-number { font-size: 51px; }
  .finding-body b { font-size: 21px; }
  .finding-body small { font-size: 11px; }
  .finding-title { font-size: 16px; padding-top: 11px; line-height: 1.6; }
  .finding-title em, .finding-title .muted-em { font-size: 12px; }
  .finding-foot { font-size: 9px; margin-top: 9px; }
  .finding-label { font-size: 8px; gap: 3px; }
  .scope-bar { margin: 16px 0 24px; gap: 5px; }
  .scope-bar > span { font-size: 9px; }
  .scope-bar p { font-size: 11px; }
  .scope-bar p span { margin: 0 4px; }
  h2 { font-size: 21px; }
  .download-link { font-size: 10px; padding: 6px 8px; }
  .group-tabs { gap: 19px; }
  .group-tab { font-size: 11px; gap: 5px; }
  .group-tab span { font-size: 9px; min-width: 17px; padding: 3px 4px; }
  .filters { grid-template-columns: 1fr 1fr; gap: 8px; }
  .search-field { grid-column: 1 / -1; }
  .filters input, .filters select { height: 40px; font-size: 12px; }
  .search-field svg { top: 12px; }
  .table-meta { font-size: 9px; min-height: 42px; gap: 10px; }
  .table-meta p { max-width: 77%; }
  .table-scroll { max-height: 465px; }
  table { min-width: 610px; }
  th.name-heading { width: 205px; }
  td.case-name, th.name-heading { position: sticky; left: 0; background: #fcfcf9; z-index: 2; box-shadow: 1px 0 #e0e3db; }
  th.name-heading { z-index: 3; background: #eeefe8; }
  .selected td.case-name { background: var(--green-soft); }
  .case-button { padding-left: 10px; }
  .row-name { font-size: 11px; }
  .row-location { font-size: 9px; }
  .legend { gap: 5px 12px; }
  .legend::after { content: 'เลื่อนตารางไปทางขวาเพื่อดูครบ 8 มิติ →'; display: block; flex-basis: 100%; color: var(--green); margin-top: 3px; }
  .comparison-note { font-size: 9px; }
  .detail { margin-top: 5px; }
  .detail-top, .detail-body { padding: 18px; }
  .evidence-list { display: block; }
  .evidence-list li { padding: 9px 0; font-size: 12px; }
  .method-grid { grid-template-columns: 1fr; gap: 16px; }
  .methodology summary { font-size: 11px; }
  .methodology summary span { font-size: 9px; margin-left: 7px; }
  footer { flex-direction: column; gap: 10px; font-size: 9px; }
  footer nav { gap: 18px; }
  dialog { padding: 20px; }
  dialog h2 { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
