@font-face {
  font-family: "ClassUp Thai";
  src: url("fonts/classup/NotoSansThai-Regular.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "ClassUp Thai";
  src: url("fonts/classup/NotoSansThai-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --brand: #2563eb;
  --ink: #1f2937;
  --muted: #475569;
  --border: #d7e0ea;
  --surface: #fff;
  --background: #f6f8fa;
}

* { box-sizing: border-box; }
html { scroll-padding-top: 2rem; }
body { margin: 0; font: 1rem/1.8 "ClassUp Thai", system-ui, sans-serif; color: var(--ink); background: var(--background); }
a { color: #1d4ed8; text-underline-offset: .2em; }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--brand); outline-offset: 5px; border-radius: 4px; }
.skip { position: absolute; left: 1rem; top: -6rem; z-index: 2; background: white; padding: 1rem; }
.skip:focus { top: 1rem; }
.header { display: flex; align-items: center; gap: 1.25rem; padding: 1rem max(1.25rem, calc((100% - 1120px) / 2)); border-bottom: 1px solid var(--border); background: var(--surface); }
.brand { font-size: 1.4rem; font-weight: 700; text-decoration: none; }
.login { margin-left: auto; white-space: nowrap; }
main { max-width: 1120px; margin: auto; padding: 2.5rem 1.25rem; }
h1, h2, h3 { line-height: 1.5; margin: 0 0 .75rem; }
h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.35rem, 3vw, 1.8rem); }
h3 { font-size: 1.1rem; }
p { margin: .5rem 0 1rem; }
.intro > p { max-width: 72ch; color: var(--muted); }
.eyebrow { color: #1d4ed8; font-weight: 700; font-size: .9rem; margin: 0 0 .4rem; }
.roles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 2rem 0 3rem; }
.roles a { display: flex; flex-direction: column; padding: 1.25rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); text-decoration: none; }
.roles a:hover { border-color: var(--brand); }
.roles strong { font-size: 1.2rem; }
.roles span { color: var(--muted); margin-top: .3rem; }
.role-section { padding: 2rem 0; border-top: 1px solid var(--border); scroll-margin-top: 1rem; }
.section-title { display: flex; justify-content: space-between; gap: 1.25rem; align-items: center; margin-bottom: 1.25rem; }
.action { display: inline-block; padding: .6rem 1rem; color: #fff; background: var(--brand); border-radius: 8px; text-decoration: none; white-space: nowrap; }
.action:hover { background: #1d4ed8; }
.steps { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
article { position: relative; padding: 1.5rem 1.5rem 1rem 4rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
article p { color: var(--muted); }
.step { position: absolute; left: 1.25rem; top: 1.5rem; display: grid; place-items: center; width: 1.8rem; height: 1.8rem; color: #1d4ed8; background: #eaf0ff; border-radius: 50%; font-weight: 700; }
details { margin: 1rem 0; padding: 1rem 1.25rem; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
summary { cursor: pointer; font-weight: 700; }
details p, details ol { max-width: 85ch; margin-bottom: .5rem; }
li { padding: .25rem 0; }
.support { padding: 2rem; margin-top: 2rem; border-radius: 12px; background: #eaf0ff; }
footer { padding: 1.5rem; text-align: center; color: var(--muted); border-top: 1px solid var(--border); }
@media (width <= 640px) {
  .header { gap: .75rem; font-size: .85rem; }
  main { padding-top: 1.5rem; }
  .roles, .steps { grid-template-columns: 1fr; }
  .roles { gap: .6rem; }
  .roles a { padding: .85rem 1.1rem; }
  .section-title { align-items: flex-start; flex-direction: column; }
  .support { padding: 1.25rem; }
}
@media print {
  .header, .roles, .action, footer, .skip { display: none; }
  body { background: white; color: black; }
  main { max-width: none; padding: 0; }
  .role-section, article { break-inside: avoid; }
  .support { background: white; border: 1px solid #777; }
}
