:root {
  color-scheme: light;
  --paper: #f8f4ea;
  --white: #fffdf7;
  --ink: #211c27;
  --muted: #615969;
  --purple: #3d2859;
  --lavender: #e9e0f5;
  --amber: #ffb44e;
  --line: #d9cfc0;
  font-family: 'Instrument Sans', system-ui, sans-serif;
  background: var(--paper);
  color: var(--ink);
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--purple); text-underline-offset: .22em; }
button, input, select, textarea { font: inherit; }
button, .button { touch-action: manipulation; }
:focus-visible { outline: 3px solid #986315; outline-offset: 4px; }
.shell { width: min(1120px, calc(100% - 64px)); margin-inline: auto; }
.masthead, .footer { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding-block: 23px; }
.masthead { border-bottom: 1px solid var(--line); }
.masthead nav { display: flex; gap: 22px; align-items: center; font-size: .92rem; font-weight: 700; }
.masthead a { text-decoration: none; }
.masthead nav a { display: inline-flex; min-height: 44px; align-items: center; }
.wordmark { color: var(--ink); font-size: 1.55rem; font-weight: 850; letter-spacing: -.07em; white-space: nowrap; }
.wordmark span { color: #88500b; }
.nav-case { border: 1px solid var(--line); padding-inline: 14px; border-radius: 3px; }
.hero { display: grid; grid-template-columns: 1fr .82fr; gap: clamp(28px, 6vw, 84px); align-items: center; padding-block: 60px 48px; }
h1, h2, h3, p { margin-top: 0; }
h1, h2 { letter-spacing: -.055em; }
h1 { font-size: clamp(2.8rem, 7vw, 6.8rem); line-height: .96; margin-bottom: 22px; }
h2 { font-size: clamp(1.5rem, 2.8vw, 2.15rem); line-height: 1.07; margin-bottom: 13px; }
h3 { margin-bottom: 5px; }
p { line-height: 1.55; }
.intro { font-size: clamp(1rem, 2vw, 1.2rem); color: var(--muted); max-width: 39ch; }
.eyebrow, .tag { color: var(--purple); font-size: .75rem; font-weight: 780; letter-spacing: .09em; text-transform: uppercase; }
.hero figure { margin: 0; position: relative; background: var(--purple); padding: 20px 20px 49px; border-radius: 3px; }
.hero figure > img:first-child { width: 100%; display: block; aspect-ratio: 4/3; object-fit: cover; border: 2px solid var(--white); }
figcaption { position: absolute; left: 20px; bottom: 17px; color: var(--white); font-size: .73rem; max-width: 58%; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.report-controls { align-items: end; margin-bottom: 18px; }
.button, button { border: 1px solid var(--line); border-radius: 3px; background: var(--white); color: var(--ink); font-weight: 720; min-height: 44px; padding: 10px 15px; cursor: pointer; }
.button { display: inline-flex; align-items: center; text-decoration: none; }
.primary { background: var(--purple); border-color: var(--purple); color: white; }
.primary:hover { background: #523978; }
.quiet { background: transparent; }
.how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 23px; border-top: 1px solid var(--line); padding-block: 29px 45px; }
.how p, .hint, .footer { color: var(--muted); }
.how h2 { font-size: 1.48rem; }
.page { padding-block: 36px 49px; }
.page h1 { font-size: clamp(2.6rem, 6vw, 4.5rem); overflow-wrap: anywhere; }
.page-head { margin-bottom: 23px; }
.page-head p { max-width: 65ch; }
.case-nav { display: flex; gap: 18px; border-bottom: 1px solid var(--line); margin-bottom: 19px; }
.case-nav a { min-height: 44px; display: inline-flex; align-items: center; font-weight: 730; text-decoration: none; }
.case-nav a[aria-current] { border-bottom: 3px solid var(--purple); }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.card { padding: clamp(16px, 3vw, 24px); border: 1px solid var(--line); background: var(--white); border-radius: 4px; margin-bottom: 14px; min-width: 0; overflow-wrap: anywhere; }
.callout, .notice { padding: 13px 16px; background: var(--lavender); border-left: 3px solid var(--purple); margin-bottom: 15px; }
.notice:empty { display: none; }
.fields { display: grid; gap: 11px; margin-bottom: 12px; }
.two { grid-template-columns: 1fr 1fr; }
label { display: grid; gap: 5px; font-weight: 650; }
input, textarea, select { width: 100%; min-width: 0; border: 1px solid #9d929f; border-radius: 3px; background: white; color: var(--ink); padding: 9px 10px; min-height: 44px; }
textarea { min-height: 76px; resize: vertical; }
.hint { font-size: .9rem; }
.records { list-style: none; margin: 0 0 14px; padding: 0; }
.records li { border-bottom: 1px solid var(--line); padding-block: 11px; }
.records li:first-child { border-top: 1px solid var(--line); }
.records p { margin: 5px 0 0; }
.record-title { display: flex; align-items: baseline; gap: 8px; justify-content: space-between; }
.records details > summary { cursor: pointer; min-height: 44px; padding-block: 10px; font-weight: 700; }
.pilot-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-bottom: 20px; }
.pilot-stats div { background: var(--lavender); padding: 12px; border-radius: 3px; }
.pilot-stats strong { display: block; font-size: 2rem; }
.footer { border-top: 1px solid var(--line); font-size: .85rem; }
@media (max-width: 650px) {
  .shell { width: calc(100% - 32px); }
  .masthead { padding-block: 10px; gap: 8px; }
  .masthead nav { gap: 9px; font-size: .78rem; }
  .nav-case { padding-inline: 8px; }
  .hero, .grid { grid-template-columns: 1fr; }
  .hero { padding-block: 32px 25px; gap: 25px; }
  .hero figure { width: 100%; max-width: 460px; padding: 13px 13px 45px; }
  figcaption { left: 13px; bottom: 13px; line-height: 1.3; }
  .how { grid-template-columns: 1fr; gap: 11px; padding-block: 22px; }
  .how p { margin-bottom: 0; }
  .case-nav { gap: 12px; }
  .page { padding-top: 22px; }
  .two { grid-template-columns: 1fr; }
}
@media print {
  body { background: white; }
  .masthead, .footer, .case-nav, .no-print, .notice { display: none; }
  .shell { width: 100%; }
  .page { padding: 0; }
  .card, li { break-inside: avoid; }
}

.findings-head { display:flex; justify-content:space-between; align-items:end; gap:20px; margin:24px 0; }
.findings-head p { max-width:55ch; color:var(--muted); }
.gallery-filter { max-width:220px; margin-bottom:18px; }
.finding-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; margin-bottom:24px; }
.finding-card { border:1px solid var(--line); background:var(--white); display:flex; flex-direction:column; min-width:0; }
.finding-cover { aspect-ratio:4/3; display:grid; place-items:center; background:#eee9df; color:var(--muted); overflow:hidden; }
.finding-cover img { width:100%; height:100%; object-fit:contain; }
.finding-copy { padding:17px; display:flex; flex-direction:column; flex:1; }
.finding-copy p { color:var(--muted); overflow-wrap:anywhere; }
.finding-copy button { margin-top:auto; }
.review-dialog { width:min(1000px,calc(100% - 32px)); max-height:90vh; border:1px solid var(--line); background:var(--white); padding:24px; color:var(--ink); }
.review-dialog::backdrop { background:#211c27bb; }
.review-head { display:flex; justify-content:space-between; gap:15px; align-items:start; border-bottom:1px solid var(--line); margin-bottom:20px; }
.review-head button { font-size:24px; }
.review-grid section { min-width:0; overflow-wrap:anywhere; }
.photo-strip { display:flex; gap:8px; overflow-x:auto; margin:12px 0; }
.photo-strip > div { flex:0 0 min(250px,75%); }
.photo-strip a { display:block; }
.photo-strip button { width:100%; font-size:.8rem; }
.check-label { display:flex; align-items:center; gap:8px; }
.check-label input { width:auto; min-height:auto; }
.photo-strip img { width:100%; height:190px; object-fit:contain; background:#eee9df; }
@media(max-width:650px) { .finding-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } .findings-head { align-items:start; flex-direction:column; } .review-dialog { padding:16px; } }

.review-images { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.review-images section { min-width:0; overflow-wrap:anywhere; }
@media(max-width:650px) {
  .finding-grid { grid-template-columns:1fr; }
  .review-images { gap:8px; }
  .review-images h3 { font-size:1rem; }
  .review-images .photo-strip > div { flex-basis:100%; }
  .review-images .photo-strip img { height:145px; }
  .review-images input[type=file] { max-width:100%; font-size:.75rem; }
}

.step-list { display:grid; gap:0; }
.step { display:flex; align-items:start; gap:12px; padding:16px 0; border-top:1px solid var(--line); font-weight:400; }
.step input { width:20px; min-width:20px; min-height:20px; margin-top:3px; }
.step span span { display:block; margin-top:5px; color:var(--muted); line-height:1.5; }
.search-links { display:flex; flex-wrap:wrap; gap:8px; }
[lang=th] h1,[lang=th] h2 { letter-spacing:0; line-height:1.2; }
@media(max-width:650px) { .case-nav { overflow-x:auto; white-space:nowrap; } .masthead nav { gap:5px; } #language-toggle { padding:8px; } }

/* Home: restore the original orange-and-ink identity. */
.wordmark { font-style: italic; font-weight: 900; text-transform: uppercase; letter-spacing: -.065em; position: relative; }
.wordmark::after { content: ""; position: absolute; width: 44%; height: 4px; background: #d44700; bottom: -3px; right: 0; border-radius: 8px; transform: rotate(-3deg); }
.hero { grid-template-columns: minmax(0, .9fr) minmax(0, 1.25fr); gap: clamp(20px, 4vw, 60px); }
.hero .eyebrow, .how .eyebrow { color: #a44713; }
.hero-copy .intro { color: var(--ink); }
.hero .primary { background: #ce4400; border-color: #ce4400; }
.hero .primary:hover { background: #a83900; }
.hero .quiet { border-color: #211c27; }
.hero .button { border-radius: 10px; min-height: 52px; }
.example-link { display: inline-block; padding: 0; margin-top: 18px; background: transparent; border: 0; min-height: 36px; color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.hero-art { position: relative; display: grid; grid-template-columns: 40% 60%; align-items: center; isolation: isolate; min-width: 0; }
.hero-art::before { content: ""; position: absolute; z-index: -1; width: 78%; aspect-ratio: 1; right: 2%; top: 50%; transform: translateY(-50%); background: #ff8a32; border-radius: 50%; }
.hero-detective { display: block; width: 100%; height: auto; object-fit: contain; }
.hero-camera { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 5px; box-shadow: 0 12px 28px #54291922; }
.how .eyebrow { margin-bottom: 12px; }
@media(max-width:650px) {
  .hero { grid-template-columns: 1fr; }
  .hero-art { width: 100%; max-width: 520px; min-height: min(78vw, 390px); margin-inline: auto; grid-template-columns: 38% 62%; }
  .masthead { flex-wrap: wrap; }
  .masthead .wordmark { font-size: 1.35rem; }
  #language-toggle { white-space: nowrap; }
  .hero .actions { align-items: stretch; }
  .hero .button { justify-content: center; }
}
.replay-picker { position: relative; overflow: hidden; cursor: pointer; }
.replay-picker input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
#replay-frame iframe { display: block; border: 0; width: 100%; min-height: 80vh; height: 100vh; margin-top: 1.5rem; background: #f7f4ed; }
