/* APP CHROME • shared layout, navigation and interactive elements */
.site {
  min-height: 100svh;
  padding-bottom: 102px
}

.app-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border)
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  min-height: 82px
}

.brand {
  display: inline-flex;
  gap: 11px;
  align-items: center;
  min-width: 0
}

.brand-mark {
  width: 41px;
  height: 41px;
  border-radius: 12px;
  color: white;
  background: var(--brand-mahidol);
  display: grid;
  place-items: center;
  flex: none
}

.brand-mark svg {
  width: 23px;
  height: 23px;
  stroke-width: 2.1
}

.brand-text {
  min-width: 0;
  display: block
}

.brand-text strong {
  display: block;
  font: 800 .92rem/1.1 var(--font-en);
  letter-spacing: -.04em;
  color: var(--brand-deep)
}

.brand-text strong span {
  color: var(--brand-teal);
  font-weight: 600
}

.brand-text small {
  display: block;
  margin-top: 5px;
  font: 500 .57rem/1.3 var(--font-en);
  letter-spacing: .005em;
  color: var(--ink-muted)
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 26px
}

.desktop-nav a {
  font-weight: 600;
  font-size: .8rem;
  color: var(--ink-muted);
  white-space: nowrap;
  transition: color .16s
}

.desktop-nav a:hover,
.desktop-nav a.selected {
  color: var(--brand-mahidol)
}

.desktop-nav a.selected {
  position: relative
}

.desktop-nav a.selected::after {
  content: "";
  position: absolute;
  bottom: -29px;
  height: 3px;
  left: 0;
  right: 0;
  border-radius: 5px;
  background: var(--brand-mahidol)
}

.header-contact {
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 14px;
  white-space: nowrap;
  font-size: .78rem;
  font-weight: 700;
  color: var(--brand-deep);
  background: white;
  transition: border-color .16s
}

.header-contact:hover {
  border-color: var(--brand-mahidol)
}

.header-contact svg {
  width: 18px;
  height: 18px
}

.hero {
  position: relative
}

.hero-home {
  padding-top: 44px;
  padding-bottom: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px
}

.overline {
  display: flex;
  align-items: center;
  gap: 9px;
  font: 700 .67rem/1.4 var(--font-en);
  letter-spacing: .105em;
  color: var(--brand-teal)
}

.signal {
  width: 7px;
  height: 7px;
  background: var(--brand-teal);
  border-radius: 50%;
  box-shadow: 0 0 0 4px #d7efeb
}

.hero-home h1 {
  font-weight: 700;
  font-size: var(--font-size-hero);
  line-height: 1.23;
  margin-top: 12px;
  color: var(--brand-deep)
}

.hero-home h1 span {
  display: block;
  color: var(--ink)
}

.hero-home p {
  max-width: 520px;
  margin-top: 14px;
  color: var(--ink-muted);
  font-size: .91rem
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 23px;
  font-size: .75rem;
  font-weight: 600;
  color: var(--brand-deep);
  flex-wrap: wrap
}

.hero-meta svg {
  width: 17px;
  height: 17px;
  color: var(--brand-teal)
}

.meta-separator {
  margin-inline: 3px;
  color: #c4cfd9
}

.hero-motif {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 174px;
  height: 174px;
  flex-shrink: 0;
  border-radius: 37px;
  background: #e8eefb;
  transform: rotate(3deg)
}

.hero-motif::before {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid #ccd9ec;
  border-radius: 27px
}

.motif-disc {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: white;
  display: grid;
  place-items: center;
  color: var(--brand-mahidol)
}

.motif-disc svg {
  width: 39px;
  height: 39px;
  stroke-width: 1.5
}

.motif-caption {
  z-index: 1;
  margin-top: 12px;
  text-align: center;
  font: 800 .58rem/1.4 var(--font-en);
  letter-spacing: .12em;
  color: var(--brand-deep)
}

.hero-page {
  padding: 24px 0 25px
}

.back-link {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  font-size: .79rem;
  font-weight: 600;
  color: var(--ink-muted);
  min-height: 36px
}

.back-link:hover {
  color: var(--brand-mahidol)
}

.back-link svg {
  width: 17px;
  height: 17px
}

.subpage-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 13px
}

.subpage-heading h1 {
  margin: 8px 0 3px;
  font-size: clamp(1.55rem, 4vw, 2.25rem);
  font-weight: 700;
  color: var(--brand-deep)
}

.subpage-heading p {
  font-size: .83rem;
  color: var(--ink-muted)
}

.page-icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  background: var(--surface-blue);
  color: var(--brand-mahidol);
  border: 1px solid #dfe8f9;
  border-radius: 20px
}

.page-icon svg {
  width: 31px;
  height: 31px
}

.content-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 29px 30px 35px;
  box-shadow: var(--shadow-soft);
  min-height: 400px
}

.page-column {
  max-width: 850px;
  margin-inline: auto
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 10px;
  margin-bottom: 19px
}

.section-heading h2 {
  font-size: 1.13rem;
  font-weight: 700;
  color: var(--ink)
}

.section-heading p {
  font-size: .78rem;
  color: var(--ink-subtle);
  margin-top: 3px
}

.callout {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 16px 17px;
  border: 1px solid #dce8f5;
  background: #f3f7fc;
  border-radius: 14px;
  margin-bottom: 25px;
  color: var(--brand-deep);
  font-size: .82rem;
  line-height: 1.65
}

.callout-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  color: var(--brand-blue)
}

.callout-icon svg {
  width: 19px;
  height: 19px
}

.callout-warning {
  background: var(--alert-bg);
  border-color: #f3e4df;
  color: #633c34
}

.callout-warning .callout-icon {
  color: var(--alert)
}

.callout strong {
  color: inherit
}

.rows {
  display: grid;
  gap: 12px
}

.list-row {
  width: 100%;
  min-height: 82px;
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 13px 15px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 15px;
  text-align: left;
  transition: border-color .15s, background .15s
}

.list-row:hover {
  border-color: #a9c5db;
  background: #fbfdff
}

.row-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--surface-blue);
  color: var(--brand-mahidol);
  flex-shrink: 0
}

.row-icon svg {
  width: 23px;
  height: 23px
}

.row-content {
  flex: 1;
  min-width: 0
}

.row-content strong {
  display: block;
  font-size: .89rem;
  line-height: 1.4;
  color: var(--ink)
}

.row-content small {
  display: block;
  margin-top: 4px;
  color: var(--ink-subtle);
  font-size: .73rem;
  line-height: 1.55
}

.row-action {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  color: var(--brand-mahidol);
  flex-shrink: 0
}

.row-action svg {
  width: 18px;
  height: 18px
}

.row-accordion {
  min-width: 0
}

.row-accordion summary {
  list-style: none
}

.row-accordion summary::-webkit-details-marker {
  display: none
}

.row-accordion[open] .list-row {
  border-color: #c6d9ec;
  border-radius: 15px 15px 0 0
}

.row-accordion[open] .row-action {
  transform: rotate(90deg)
}

.accordion-body {
  border: 1px solid #c6d9ec;
  border-top: 0;
  border-radius: 0 0 15px 15px;
  padding: 15px 20px 18px 78px;
  font-size: .81rem;
  color: var(--ink-muted);
  line-height: 1.75
}

.item-download .row-icon {
  background: var(--surface-teal);
  color: var(--brand-teal)
}

.item-download .row-action {
  color: var(--brand-teal)
}

.micro-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 21px;
  font-size: .75rem;
  color: var(--ink-muted);
  line-height: 1.7
}

.micro-note svg {
  color: var(--brand-blue);
  width: 17px;
  height: 17px;
  margin-top: 3px
}

.micro-note a {
  color: var(--brand-blue);
  text-decoration: underline;
  text-underline-offset: 3px
}

.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 28px 0 14px
}

.footer strong {
  display: block;
  font: 700 .79rem/1.4 var(--font-en);
  color: var(--brand-deep)
}

.footer span {
  display: block;
  font-size: .72rem;
  color: var(--ink-subtle)
}

.footer p {
  font-size: .72rem;
  color: var(--ink-muted);
  text-align: right
}

.footer a {
  font-weight: 700;
  color: var(--brand-mahidol);
  white-space: nowrap
}

.bottom-nav {
  display: none
}

.menu-visible {
  overflow: hidden
}

.menu-scrim {
  position: fixed;
  inset: 0;
  background: rgba(15, 32, 49, .42);
  z-index: 45
}

.menu-dialog {
  position: fixed;
  bottom: calc(89px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 46;
  width: min(440px, calc(100% - 28px));
  background: #fff;
  border-radius: 22px;
  padding: 19px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-pop)
}

.menu-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 12px
}

.menu-heading h2 {
  font-size: 1.07rem
}

.close-menu {
  width: 39px;
  height: 39px;
  border: 1px solid var(--border);
  background: white;
  border-radius: 10px;
  display: grid;
  place-items: center
}

.close-menu svg {
  width: 18px;
  height: 18px
}

.menu-links {
  display: grid;
  gap: 5px
}

.menu-links a {
  display: flex;
  gap: 12px;
  align-items: center;
  min-height: 49px;
  padding: 10px 12px;
  border-radius: 10px;
  font-weight: 600;
  font-size: .82rem
}

.menu-links a:hover {
  background: var(--surface-blue)
}

.menu-links a>svg:first-child {
  width: 20px;
  height: 20px;
  color: var(--brand-mahidol)
}

.menu-chevron {
  margin-left: auto;
  color: var(--ink-subtle);
  width: 17px;
  height: 17px
}

@media(max-width:1050px) {
  .desktop-nav {
    gap: 14px
  }

  .desktop-nav a {
    font-size: .74rem
  }
}

@media(max-width:900px) {
  .desktop-nav {
    display: none
  }

  .header-contact span {
    display: none
  }

  .header-contact {
    width: 43px;
    height: 43px;
    padding: 0;
    justify-content: center
  }
}

@media(max-width:650px) {
  .site {
    padding-bottom: calc(98px + env(safe-area-inset-bottom))
  }

  .layout {
    width: calc(100% - 32px)
  }

  .header-inner {
    min-height: 71px
  }

  .brand-mark {
    width: 37px;
    height: 37px;
    border-radius: 10px
  }

  .brand-mark svg {
    width: 21px;
    height: 21px
  }

  .brand-text strong {
    font-size: .8rem
  }

  .brand-text small {
    font-size: .62rem;
    max-width: 245px
  }

  .header-contact {
    width: 39px;
    height: 39px;
    border-radius: 11px
  }

  .hero-home {
    padding-top: 29px;
    padding-bottom: 28px;
    gap: 0
  }

  .hero-home h1 {
    font-size: clamp(1.7rem, 6.5vw, 2.2rem);
    margin-top: 11px
  }

  .hero-home p {
    margin-top: 11px;
    font-size: .79rem;
    max-width: 380px;
    line-height: 1.7
  }

  .hero-meta {
    font-size: .67rem;
    margin-top: 19px;
    gap: 5px 7px
  }

  .hero-meta svg {
    width: 15px;
    height: 15px
  }

  .hero-motif {
    display: none
  }

  .hero-page {
    padding-top: 13px;
    padding-bottom: 22px
  }

  .subpage-heading {
    margin-top: 10px
  }

  .subpage-heading h1 {
    font-size: 1.47rem;
    line-height: 1.38;
    margin-top: 5px
  }

  .subpage-heading p {
    font-size: .75rem
  }

  .subpage-heading .overline {
    font-size: .58rem
  }

  .page-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px
  }

  .page-icon svg {
    width: 25px;
    height: 25px
  }

  .content-panel {
    width: 100%;
    border: 0;
    border-radius: 23px 23px 0 0;
    padding: 24px 16px 30px;
    box-shadow: none;
    min-height: calc(100svh - 310px)
  }

  .section-heading {
    margin-bottom: 17px
  }

  .section-heading h2 {
    font-size: 1.05rem
  }

  .section-heading p {
    font-size: .78rem
  }

  .callout {
    padding: 13px 14px;
    border-radius: 12px;
    font-size: .77rem;
    gap: 9px;
    margin-bottom: 23px
  }

  .callout-icon {
    width: 22px;
    height: 22px
  }

  .rows {
    gap: 11px
  }

  .list-row {
    padding: 12px;
    min-height: 76px;
    gap: 12px;
    border-radius: 14px
  }

  .row-icon {
    width: 45px;
    height: 45px
  }

  .row-icon svg {
    width: 21px;
    height: 21px
  }

  .row-content strong {
    font-size: .84rem
  }

  .row-content small {
    font-size: .75rem
  }

  .accordion-body {
    padding: 13px 15px 15px 70px
  }

  .footer {
    padding: 23px 16px 8px;
    display: block;
    text-align: center
  }

  .footer p {
    margin-top: 7px;
    text-align: center;
    line-height: 1.65
  }

  .footer strong {
    font-size: .72rem
  }

  .footer span {
    font-size: .67rem
  }

  .bottom-nav {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 2px;
    align-items: center;
    position: fixed;
    z-index: 35;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, .98);
    border-top: 1px solid var(--border);
    padding: 6px 9px calc(7px + env(safe-area-inset-bottom));
    box-shadow: 0 -5px 22px rgba(14, 44, 73, .045)
  }

  .bottom-item {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 54px;
    padding: 6px 2px;
    border: 0;
    background: transparent;
    color: var(--ink-subtle);
    font-size: .63rem;
    font-weight: 600;
    white-space: nowrap
  }

  .bottom-item svg {
    width: 20px;
    height: 20px
  }

  .bottom-item.active {
    color: var(--brand-mahidol)
  }

  .bottom-item.active::before {
    content: "";
    position: absolute;
    top: 0;
    width: 27px;
    height: 3px;
    border-radius: 0 0 4px 4px;
    background: var(--brand-mahidol)
  }

  .more-item.active {
    color: var(--brand-mahidol)
  }
}

@media(max-width:360px) {
  .brand-text small {
    max-width: 196px;
    font-size: .55rem
  }

  .hero-meta {
    font-size: .68rem
  }

  .bottom-item {
    font-size: .61rem
  }
}