:root{--ink:#122a43;--gold:#a57828;--paper:#faf7f0;--white:#fffdfa;--line:#d9d0c1;--font:21px}*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--paper);color:var(--ink);font:var(--font)/1.7 Sarabun,"Noto Sans Thai",sans-serif}a{color:#154a74}button,input{font:inherit}button,.button{min-height:48px;padding:.42em .8em;border:1px solid #9b8a71;border-radius:9px;background:var(--white);color:var(--ink);cursor:pointer;display:inline-flex;align-items:center;justify-content:center;text-decoration:none}button:hover,.button:hover{background:#efe6d3}button:focus-visible,a:focus-visible,input:focus-visible{outline:3px solid #a57828;outline-offset:3px}.primary{background:var(--ink);color:white;border-color:var(--ink)}.primary:hover{background:#27435e}.skip{position:absolute;left:-9999px;top:8px;z-index:30;background:white;padding:8px}.skip:focus{left:8px}.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}.masthead{position:sticky;top:0;z-index:9;background:var(--white);border-bottom:3px solid var(--gold);display:flex;align-items:center;justify-content:space-between;padding:10px 2.2vw;gap:16px}.brand{display:flex;align-items:center;gap:20px;text-decoration:none;color:var(--ink);font-weight:700}.brand img{width:170px;height:auto}.head-actions{display:flex;align-items:center;gap:15px}.plain-link{font-weight:700}.shell{display:grid;grid-template-columns:minmax(210px,265px) minmax(0,1fr);max-width:1600px;margin:auto}.side{border-right:1px solid var(--line);background:#f3eee5}.side-inner{position:sticky;top:90px;max-height:calc(100vh - 90px);overflow-y:auto;padding:16px}.side nav{display:grid;gap:3px}.side a{display:block;padding:7px 11px;border-radius:8px;text-decoration:none;color:var(--ink);font-size:.82em;line-height:1.35}.side a:hover,.side a[aria-current=page]{background:#dcd1bb;font-weight:700}.side small{display:block;color:#5e5345}.eyebrow{font-size:.72em;letter-spacing:.09em;text-transform:uppercase;color:#655840;font-weight:700}main{min-width:0;padding:28px clamp(18px,3.5vw,65px) 80px;max-width:1190px;width:100%;margin:auto}h1,h2,h3{line-height:1.3;color:#102942}h1{font-size:clamp(1.5em,3vw,2em);margin:.1em 0 .5em}h2{font-size:1.35em;margin:1.5em 0 .55em}h3{font-size:1.08em;margin:.5em 0}p{margin:.7em 0}small,.small{font-size:.8em}.muted{color:#5c574d}.lead{font-size:1.08em}.hero{background:#112c49;color:#fff;padding:28px clamp(20px,3vw,45px);border-radius:18px}.hero h1{color:#fff}.hero p{max-width:750px}.field{display:grid;gap:8px;margin:25px 0}.field label{font-weight:700}.field input{width:100%;min-height:55px;padding:8px 14px;border:2px solid #9d9689;border-radius:10px;background:#fff}.tools-grid,.task-grid,.results{display:grid;grid-template-columns:repeat(auto-fit,minmax(225px,1fr));gap:12px}.tile{display:block;background:var(--white);border:1px solid var(--line);border-radius:12px;padding:17px;text-decoration:none;color:var(--ink)}.tile:hover{border-color:var(--gold);box-shadow:0 4px 12px #283b491f}.tile strong{display:block}.tile p{font-size:.82em;line-height:1.4;margin:5px 0;color:#514a40}.crumb{font-size:.8em;color:#584a39;margin:2px 0 18px}.crumb a{color:inherit}.chapter-header{border-bottom:1px solid var(--line);padding-bottom:19px}.actions,.font-controls,.mode-controls,.pager{display:flex;flex-wrap:wrap;gap:10px;margin:17px 0}.font-controls button,.mode-controls button{font-size:.78em}.label{display:inline-block;background:#e7d5b5;color:#3d2d1b;border-radius:24px;padding:2px 12px;font-size:.72em;font-weight:700}.panel{background:var(--white);border:1px solid var(--line);border-radius:14px;padding:20px;margin:20px 0}.panel h2:first-child{margin-top:0}.step{background:var(--white);border:1px solid var(--line);border-radius:14px;margin:14px 0;padding:18px}.step-num{background:#112c49;color:white;min-width:39px;height:39px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;font-weight:700;margin-right:10px}.expected{background:#edf3ea;border-left:5px solid #3c644c;padding:10px 14px;margin-top:12px}.figure{max-width:100%;margin:25px 0;background:#fff;border:1px solid var(--line);border-radius:12px;padding:12px}.screenshot-button{display:block;padding:0;border:0;min-height:0;width:100%;background:none;position:relative}.screenshot-button:hover{background:none}.image-wrap{position:relative;display:block;width:100%;line-height:0}.image-wrap img{width:100%;height:auto;display:block}.image-wrap svg{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}.image-wrap rect{fill:transparent;stroke:#cc3c16;stroke-width:5;vector-effect:non-scaling-stroke}.image-wrap circle{fill:#a9210a;stroke:white;stroke-width:3}.image-wrap text{font:700 24px Arial;fill:white;dominant-baseline:middle;text-anchor:middle}.fig-list{padding-left:1.6em;font-size:.82em}.fig-list li{margin:4px 0}.figure figcaption{font-size:.79em;color:#3f4c57;margin-top:10px}.notice{border-left:5px solid var(--gold);background:#f7eacd;padding:15px}.pager{justify-content:space-between}.mobile-menu{display:none}.search-result{border-bottom:1px solid var(--line);padding:12px 0}footer{padding:22px;text-align:center;border-top:1px solid var(--line);font-size:.8em}dialog{border:0;border-radius:12px;padding:14px;width:min(96vw,1500px);max-width:96vw;max-height:96vh;background:white;color:var(--ink);box-shadow:0 25px 80px #0007}dialog::backdrop{background:#071725d9}.dialog-top{display:flex;justify-content:space-between;align-items:center;gap:15px;flex-wrap:wrap}.dialog-top>div{display:flex;gap:7px;flex-wrap:wrap}.dialog-top button{font-size:16px}.dialog-scroll{overflow:auto;max-height:76vh;background:#eee}.dialog-scroll .image-wrap{width:100%;min-width:0}.dialog-scroll img{width:100%}#dialogCaption{font-size:16px}.status-list li{margin:7px 0}@media(max-width:850px){.shell{display:block}.side{display:none;position:fixed;z-index:11;top:70px;left:0;bottom:0;width:min(85vw,340px);box-shadow:0 0 0 100vmax #0a1c2b99}.side.open{display:block}.side-inner{top:0;max-height:100%;height:100%;background:#f3eee5}.mobile-menu{display:inline-flex}.brand img{width:130px}.brand span{font-size:.8em}.masthead{min-height:70px}main{padding:20px 16px 70px}}@media(max-width:450px){body{font-size:var(--font)}.brand{gap:5px}.brand span{display:none}.plain-link{font-size:15px}.hero{padding:18px}.panel{padding:15px}.dialog-top button{min-height:44px}.fig-list{padding-left:1.3em}}@media print{body{font-size:13pt;color:#000;background:white}.masthead,.side,.actions,.font-controls,.mode-controls,.pager,.mobile-menu,.search,.home-only,footer{display:none!important}.shell{display:block}main{padding:0;max-width:none}.panel,.step,.figure{break-inside:avoid;border-color:#aaa}.figure{max-width:95%}.image-wrap rect{stroke:#b21d00}.figure figcaption,.fig-list{color:#000}a{color:#000;text-decoration:none}dialog{display:none!important}}

.benefit{background:#f3ead8;border-left:6px solid #98631c;padding:15px 20px;margin:16px 0;border-radius:0 12px 12px 0}.benefit strong{font-size:1.08em;color:#32220e}.benefit p{margin:.25em 0 0;font-weight:600}

/* The guide starts with a task, while optional reading controls stay accessible. */
.home-finder{margin-top:24px}
.home-finder .field{margin:0 0 18px}
.home-finder h2{margin:20px 0 12px}
.home-hero p:last-child{margin-bottom:0}
.pdf-download{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:14px;padding:12px 17px;border:1px solid #d4bd90;border-radius:10px;background:#f7eedb}
.pdf-download>div{display:grid;gap:2px;line-height:1.35}
.pdf-download strong{font-size:.92em}
.pdf-download span{font-size:.77em;color:#554e45}
.pdf-download .button{flex:0 0 auto;font-size:.78em;font-weight:700}
.more-tasks,.reader-settings,.article-more{margin:14px 0;border:1px solid var(--line);border-radius:10px;background:var(--white)}
.more-tasks>summary,.reader-settings>summary,.article-more>summary{min-height:48px;display:flex;align-items:center;cursor:pointer;padding:10px 14px;font-weight:700;color:var(--ink)}
.more-tasks>summary:focus-visible,.reader-settings>summary:focus-visible,.article-more>summary:focus-visible{outline:3px solid var(--gold);outline-offset:3px}
.more-tasks[open]>.task-grid{padding:0 12px 12px}
.reader-settings .font-controls,.reader-settings .actions,.article-more .actions{margin:4px 12px 12px}
.home-utilities{margin-top:30px}
.guide-status-note{border-left:4px solid var(--gold);padding:8px 12px;background:#f3ead8;font-size:.79em;line-height:1.5}
.chapter-jump{display:flex;flex-wrap:wrap;gap:8px;margin:16px 0}
.chapter-jump a{min-height:46px;display:inline-flex;align-items:center;padding:7px 12px;border:1px solid #a9a08f;border-radius:8px;background:var(--white);font-size:.82em;text-decoration:none}
.chapter-jump a:first-child{border-color:var(--ink);background:var(--ink);color:#fff}
.close-menu{margin:0 0 10px auto;font-size:.8em}
.article-more{margin:0}
html{scroll-padding-top:95px}
@media(max-width:560px){
  body{font-size:calc(var(--font) * .9);line-height:1.55}
  .masthead{min-height:60px;padding:7px 14px;gap:8px}
  .brand img{width:105px}
  .head-actions{gap:7px}
  .head-actions .plain-link{font-size:14px;white-space:nowrap}
  #menuToggle{min-height:44px;padding:6px 10px;font-size:15px}
  .side{top:60px}
  main{padding:12px 14px 60px}
  .home-hero{padding:15px 17px;border-radius:11px}
  .home-hero .eyebrow{font-size:11px;letter-spacing:.03em;margin:0}
  .home-hero h1{font-size:1.48em;margin:4px 0}
  .home-hero p:last-child{font-size:.91em;line-height:1.45}
  .pdf-download{padding:9px 11px;gap:9px;align-items:center}
  .pdf-download>div{min-width:0}
  .pdf-download strong{font-size:.78em}
  .pdf-download span{font-size:.69em;line-height:1.3}
  .pdf-download .button{min-height:46px;padding:6px 9px;font-size:.73em;max-width:44%;line-height:1.25;text-align:center}
  .home-finder{margin-top:15px}
  .home-finder .field{gap:5px;margin:0 0 10px}
  .home-finder .field label{font-size:.91em}
  .home-finder .field input{min-height:48px;font-size:16px}
  .home-finder h2{font-size:1.14em;margin:18px 0 8px}
  .task-grid,.tools-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .tile{min-height:54px;display:flex;align-items:center;padding:9px 10px;border-radius:9px;line-height:1.35}
  .tile strong{font-size:.88em}
  .tile p{display:none}
  .more-tasks{margin:9px 0 16px}
  .more-tasks>summary{font-size:.86em}
  .home-utilities{margin-top:23px}
  .guide-status-note{margin:0 0 9px}
  .reader-settings{margin:7px 0}
  .reader-settings .font-controls{display:grid;grid-template-columns:1fr 1fr;gap:8px}
  .reader-settings .font-controls button:last-child{grid-column:1/-1}
  .reader-settings .actions{display:grid}
  .chapter-header{padding-bottom:10px}
  .chapter-header h1{font-size:1.48em}
  .chapter-header .lead{font-size:1em}
  .chapter-jump{gap:7px;margin:10px 0}
  .chapter-jump a{font-size:.77em;min-height:44px}
  .article-actions{margin:12px 0}
  .article-actions>.button{width:100%}
  .article-more{width:100%}
  .panel,.step{padding:14px}
  .figure{padding:8px;margin:16px 0}
}
@media print{.home-utilities,.chapter-jump,.article-more>summary{display:none!important}.article-more .actions{display:none}}

.case-grid{display:grid;gap:16px;margin-top:16px}.case{border:1px solid #d9d0c1;border-left:5px solid #a87a39;border-radius:10px;padding:18px;background:#fffcf7;scroll-margin-top:85px}.case h3{margin:0 0 8px}.case p{font-size:.9em;line-height:1.55;margin:9px 0}.case .case-kind{color:#765120;font-weight:700}.case details{font-size:.82em;color:#514a40}.case details summary{cursor:pointer;font-weight:700}.case a{font-weight:700}

/* Compact, screen-first chapter layout */
.chapter-header{padding-bottom:5px;border-bottom:0}
.chapter-header h1{margin-bottom:.18em}
.chapter-header .lead,.chapter-header .small{margin:.22em 0}
.overview-heading{font-size:1.05em;margin:.42em 0 .25em}
.figure{margin:6px 0 10px;padding:6px}
.figure .image-wrap img{max-height:min(58vh,680px);object-fit:contain;background:#f3f0e9}
.fig-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:0 14px;padding-left:1.45em;margin:.35em 0;font-size:.74em;line-height:1.42}
.fig-list li{margin:2px 0}
.figure figcaption{font-size:.7em;margin-top:5px}
.article-actions{margin:7px 0}
.article-actions .button{min-height:42px}
.chapter-context{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(220px,.8fr);gap:10px;align-items:start;margin:10px 0}
.chapter-context>div,.chapter-context>details{background:var(--white);border:1px solid var(--line);border-radius:10px;padding:10px 13px}
.chapter-context p{margin:.22em 0;line-height:1.48}
.chapter-context summary{font-weight:700;cursor:pointer}
.chapter-context details p{margin-top:.45em}
.chapter-jump{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0;font-size:.76em}
.chapter-jump a{background:#f0e9dd;border-radius:7px;padding:3px 9px;text-decoration:none}
.reader-settings{margin:6px 0;font-size:.8em}
.mode-controls{margin:8px 0 2px;gap:6px}
.mode-controls button{min-height:40px;padding:.3em .7em}
.step{margin:8px 0;padding:12px 14px;border-radius:10px}
.step h3{margin:.1em 0 .3em}
.step p{margin:.28em 0;line-height:1.5}
.step-num{min-width:32px;height:32px;margin-right:7px}
.expected{padding:6px 10px;margin-top:6px;border-left-width:4px}
.result-panel{padding:13px 16px;margin:11px 0;border-radius:10px}
.result-panel h2{margin:.2em 0 .35em}
.result-panel h3{margin:.6em 0 .2em}
.result-panel p{margin:.25em 0;line-height:1.5}
.chapter-next{background:#f1eadc;border-radius:9px;padding:9px 12px;margin:10px 0}
.pager{margin:9px 0;gap:6px}
@media(max-width:650px){.chapter-context{grid-template-columns:1fr}.figure{padding:4px}.figure .image-wrap img{max-height:54vh}.fig-list{grid-template-columns:1fr;padding-left:1.35em}.chapter-jump{gap:4px}.chapter-jump a{padding:3px 7px}.step{padding:10px}}
