:root {
  --ink: #0d172b;
  --muted: #8790a1;
  --paper: #f7f8fb;
  --white: #fff;
  --line: #e5e8ef;
  --coral: #ff514d;
  --navy: #0c172c;
  --green: #30d6a1;
  --yellow: #ffc928;
  --rose: #ff6973;
  --max: 1720px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: "IBM Plex Sans Thai", sans-serif; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; }
.skip-link { position: fixed; z-index: 100; top: 8px; left: 8px; padding: 8px 14px; background: var(--navy); color: white; transform: translateY(-160%); }
.skip-link:focus { transform: none; }

.site-nav { position: sticky; top: 0; z-index: 50; min-height: 72px; padding: 0 max(28px, calc((100vw - var(--max)) / 2)); display: flex; align-items: center; justify-content: space-between; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); backdrop-filter: blur(16px); }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; }
.brand-logo { width: 50px; height: 50px; object-fit: contain; flex: 0 0 auto; }
.footer-mark { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 11px; background: var(--navy); color: var(--coral); font-size: 22px; }
.brand b { display: block; font: 700 19px/1 "Space Grotesk", sans-serif; letter-spacing: .03em; }
.brand small { display: block; margin-top: 5px; color: var(--coral); font: 700 7px/1 "Space Grotesk", sans-serif; text-transform: uppercase; letter-spacing: .08em; }
.site-menu { display: flex; align-items: center; gap: 8px; }
.site-menu a { padding: 10px 15px; border-radius: 999px; font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.site-menu a:hover, .site-menu a.active { background: #eef0f5; }
.site-menu .archive-link { padding: 11px 20px; color: white; background: var(--navy); }
.menu-button { display: none; align-items: center; gap: 8px; padding: 9px 14px; border: 0; border-radius: 999px; color: white; background: var(--navy); }

#methodology-main { width: min(var(--max), calc(100% - 48px)); margin: auto; }
.page-hero { padding: 46px 20px 68px; text-align: center; }
.hero-badge, .card-label { display: inline-flex; align-items: center; gap: 9px; margin: 0 0 18px; color: #7d8492; font: 600 11px "Space Grotesk", sans-serif; letter-spacing: .07em; text-transform: uppercase; }
.hero-badge { padding: 7px 15px; border-radius: 999px; background: #eef0f4; }
.hero-badge span, .card-label span { width: 7px; height: 7px; border-radius: 50%; background: var(--coral); }
.page-hero h1 { margin: 0; font-size: clamp(40px, 5vw, 72px); line-height: 1.15; letter-spacing: -.035em; }
.page-hero > p:last-child { margin: 28px auto 0; max-width: 1100px; color: #898e98; font-size: clamp(15px, 1.45vw, 21px); }

.method-grid { display: grid; grid-template-columns: minmax(0, 2.05fr) minmax(360px, 1fr); gap: 26px; align-items: stretch; }
.reading-card { display: grid; grid-template-columns: 1.08fr .92fr; gap: 46px; min-height: 700px; padding: 58px 54px; border: 1px solid var(--line); border-radius: 28px; background: white; box-shadow: 0 18px 60px rgba(22,33,55,.04); }
.card-label { padding: 8px 15px; border: 1px solid #d9dde5; border-radius: 999px; }
.reading-copy h2 { margin: 14px 0 24px; font: 700 clamp(31px, 3vw, 48px)/1.15 "Space Grotesk", sans-serif; letter-spacing: -.025em; }
.lead { color: #8b93a3; font-size: 17px; }
.layer-list { position: relative; margin: 44px 0 0; padding: 0; list-style: none; }
.layer-list::before { content: ""; position: absolute; left: 18px; top: 20px; bottom: 20px; width: 1px; background: #d9dce4; }
.layer-list li { position: relative; display: grid; grid-template-columns: 48px 1fr; gap: 18px; align-items: start; min-height: 88px; }
.layer-number { position: relative; z-index: 2; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: white; background: var(--navy); font: 700 12px "Space Grotesk"; box-shadow: 0 8px 18px rgba(13,23,43,.18); }
.layer-03 .layer-number { background: var(--coral); }
.layer-list h3 { margin: 4px 0 5px; font: 700 16px "Space Grotesk"; }
.layer-list p { margin: 0; color: #8b93a3; font-size: 14px; }

.diagnostic { position: relative; align-self: center; min-height: 470px; overflow: hidden; border: 1px solid #eff1f5; border-radius: 58px; background-color: #fbfcfe; background-image: radial-gradient(#dce0e7 1px, transparent 1px); background-size: 18px 18px; }
.diagnostic-label, .system-status { position: absolute; z-index: 4; padding: 10px 17px; border-radius: 12px; font: 600 9px "Space Grotesk"; letter-spacing: .05em; }
.diagnostic-label { top: 55px; left: 50px; color: #a0a6b2; background: white; box-shadow: 0 8px 22px rgba(26,37,60,.07); }
.system-status { right: 46px; bottom: 45px; color: white; background: var(--navy); }
.system-status i { display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--green); }
.axis { position: absolute; left: 50%; top: 120px; bottom: 90px; width: 1px; background: linear-gradient(var(--coral), #cdd1da); }
.axis::before, .axis::after { content: ""; position: absolute; left: -3px; width: 7px; height: 7px; border-radius: 50%; background: #cfd3dc; }
.axis::before { top: 33%; background: var(--coral); }
.axis::after { top: 68%; }
.diamond { position: absolute; left: 50%; width: 180px; height: 70px; border: 2px solid var(--navy); transform: translateX(-50%) rotateX(58deg) rotateZ(45deg); }
.diamond.semantic { top: 155px; border-color: var(--coral); background: rgba(255,81,77,.09); }
.diamond.syntactic { top: 235px; background: rgba(13,23,43,.025); }
.diamond.physical { top: 315px; background: rgba(13,23,43,.035); }

.sensitivity-card { min-height: 700px; padding: 44px 42px; border-radius: 28px; color: white; background: radial-gradient(circle at 100% 0, rgba(255,81,77,.08), transparent 40%), var(--navy); }
.sensitivity-card header { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 45px; }
.shield { display: grid; place-items: center; width: 58px; height: 58px; border: 1px solid #566071; border-radius: 16px; background: #263249; color: var(--coral); font-size: 24px; }
.secured { padding: 10px 17px; border: 1px solid rgba(255,81,77,.45); border-radius: 999px; color: var(--coral); background: rgba(255,81,77,.08); font: 700 10px "Space Grotesk"; }
.sensitivity-card > h2 { margin: 0 0 10px; font-size: clamp(25px, 2.5vw, 36px); }
.sensitivity-card > .lead { margin: 0 0 46px; color: #8e98aa; font-size: 16px; }
.sensitivity-list { display: grid; gap: 18px; }
.level { display: grid; grid-template-columns: 7px 1fr; gap: 18px; padding: 21px 20px; border: 1px solid #3b465b; border-radius: 18px; background: rgba(255,255,255,.035); }
.level > i { width: 7px; min-height: 50px; border-radius: 999px; background: var(--green); box-shadow: 0 0 18px rgba(48,214,161,.32); }
.level-02 > i { background: var(--yellow); box-shadow: 0 0 18px rgba(255,201,40,.28); }
.level-03 > i { background: var(--rose); box-shadow: 0 0 18px rgba(255,105,115,.28); }
.level h3 { display: flex; justify-content: space-between; gap: 14px; margin: 0 0 5px; font-size: 15px; }
.level h3 span { color: var(--green); font: 700 9px "Space Grotesk"; }
.level-02 h3 span { color: var(--yellow); }
.level-03 h3 span { color: var(--rose); }
.level p { margin: 0; color: #8791a4; font-size: 12px; }

.ethics-card { margin: 28px 0 80px; padding: 52px 54px; border: 1px solid var(--line); border-radius: 28px; background: white; }
.ethics-head { display: grid; grid-template-columns: 1fr 1.2fr; gap: 60px; align-items: end; padding-bottom: 35px; border-bottom: 1px solid var(--line); }
.ethics-head .card-label { margin-bottom: 12px; }
.ethics-head h2 { margin: 0; font: 700 clamp(30px, 3vw, 48px)/1.1 "Space Grotesk"; }
.ethics-head h2 span { color: var(--coral); }
.ethics-head > p { margin: 0; color: #8991a1; font-size: 16px; }
.ethics-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 35px; }
.ethic { padding: 28px; border: 1px solid var(--line); border-radius: 20px; background: #fbfcfe; }
.ethic-icon { display: grid; place-items: center; width: 45px; height: 45px; border-radius: 13px; color: var(--green); background: rgba(48,214,161,.1); font-size: 21px; }
.adapt .ethic-icon { color: var(--yellow); background: rgba(255,201,40,.12); }
.forbid .ethic-icon { color: var(--rose); background: rgba(255,105,115,.11); }
.ethic h3 { margin: 20px 0 14px; font-size: 18px; }
.ethic ul { margin: 0; padding-left: 20px; color: #727b8d; font-size: 14px; }
.ethic li { margin: 8px 0; }

.site-footer { padding: 55px max(28px, calc((100vw - var(--max)) / 2)) 24px; color: #bec6d5; background: #0a1427; }
.footer-grid { display: grid; grid-template-columns: 1.5fr .8fr 1fr; gap: 68px; }
.site-footer h2, .site-footer h3 { color: white; }
.site-footer h2 { margin: 17px 0 6px; }
.site-footer h3 { margin: 0 0 18px; font-size: 15px; }
.footer-mission > p { max-width: 550px; }
.sponsor-row { display: flex; gap: 20px; margin-top: 22px; }
.sponsor-row a { display: flex; align-items: center; gap: 10px; max-width: 220px; text-decoration: none; font-size: 10px; }
.sponsor-row img { width: 60px; height: 42px; object-fit: contain; filter: grayscale(1) brightness(0) invert(1); opacity: .8; }
.contact-list { margin: 0; padding: 0; list-style: none; }
.contact-list li { display: flex; align-items: center; gap: 10px; margin: 10px 0; }
.contact-list a { text-decoration: none; }
.org { display: flex; align-items: center; gap: 12px; }
.org img { width: 48px; height: 48px; object-fit: contain; }
.org p { margin: 0; font-size: 12px; }
.location { color: #8993a5; font: 500 11px "Space Grotesk"; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 38px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.12); font-size: 11px; }
.to-top { border: 0; color: white; background: none; cursor: pointer; font: 600 10px "Space Grotesk"; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .65s ease, transform .65s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

@media (max-width: 1100px) {
  .method-grid { grid-template-columns: 1fr; }
  .sensitivity-card { min-height: auto; }
  .sensitivity-list { grid-template-columns: repeat(3, 1fr); }
  .level { grid-template-columns: 6px 1fr; }
}
@media (max-width: 880px) {
  .menu-button { display: inline-flex; }
  .site-menu { position: absolute; top: 72px; left: 0; right: 0; display: none; flex-direction: column; align-items: stretch; padding: 15px 24px 22px; background: white; border-bottom: 1px solid var(--line); box-shadow: 0 18px 35px rgba(13,23,43,.1); }
  .site-menu.open { display: flex; }
  .site-menu a { padding: 11px 15px; }
  .reading-card { grid-template-columns: 1fr; }
  .diagnostic { min-height: 430px; }
  .sensitivity-list, .ethics-grid { grid-template-columns: 1fr; }
  .ethics-head { grid-template-columns: 1fr; gap: 18px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-mission { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .site-nav { min-height: 64px; padding: 0 16px; }
  .site-menu { top: 64px; }
  #methodology-main { width: calc(100% - 24px); }
  .page-hero { padding: 38px 8px 45px; }
  .page-hero h1 { font-size: 38px; }
  .reading-card, .sensitivity-card, .ethics-card { padding: 30px 24px; border-radius: 21px; }
  .reading-card { gap: 28px; }
  .reading-copy h2 { font-size: 36px; }
  .diagnostic { min-height: 350px; border-radius: 35px; }
  .diagnostic-label { top: 30px; left: 25px; }
  .system-status { right: 25px; bottom: 25px; }
  .axis { top: 90px; bottom: 70px; }
  .diamond { width: 130px; height: 55px; }
  .diamond.semantic { top: 115px; }
  .diamond.syntactic { top: 180px; }
  .diamond.physical { top: 245px; }
  .sensitivity-card header { margin-bottom: 35px; }
  .ethics-card { margin-bottom: 45px; }
  .footer-grid { grid-template-columns: 1fr; gap: 38px; }
  .footer-mission { grid-column: auto; }
  .sponsor-row { display: grid; }
  .footer-bottom { align-items: flex-end; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
