/* หน้าระบบสารสนเทศ (about/systems.html) ทุกกฎอยู่ใต้ .sp หรือ .sheet:has(.sp) ไม่กระทบหน้าอื่น
   เรียบ แบน ไม่มีเงา ไม่มีไล่สี ไม่มีกรอบเส้น กว้างไม่เกิน 1200px จัดกลาง ขนาดยืดตามจอ ปรับตามความกว้างเนื้อหาจริง (container query) */

.sheet:has(.sp) > :is(.crumb, h1, .sp, .siblings) { max-width: 1200px; margin-left: auto; margin-right: auto; }
.sheet:has(.sp) > h1 { line-height: 1.45; font-size: clamp(26px, 1.2rem + 1vw, 36px); }

.sp {
  --soft: #f4ecf5;
  --public: #e8f5ec;
  --staff: #eef0fa;
  --soon: #fff4dc;
  --sp: clamp(20px, 1rem + 1.4vw, 36px);
  container-type: inline-size;
  line-height: 1.6;
}
.sp [hidden] { display: none !important; }
.sp h2, .sp h3, .sp p { line-height: 1.6; }
.sp .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sp .sp-intro { max-width: 46em; margin: 0 0 clamp(16px, 2vw, 28px); color: var(--mute); font-size: clamp(15px, .85rem + .35vw, 18px); }
.sp a { text-decoration: none; }
.sp .arr { width: 16px; height: 16px; flex: none; }
.sp :is(a, button, input):focus-visible { outline: 3px solid var(--brand-dark); outline-offset: 3px; }
.sp .meta { color: var(--mute); font-size: 13px; }
.sp .go { display: inline-flex; align-items: center; gap: 6px; color: var(--brand-dark); font-weight: 700; font-size: 15px; }
.sp .ico { flex: none; display: grid; place-items: center; border-radius: 14px; }
.sp .ico img { display: block; }
.sp .tag { flex: none; display: inline-block; padding: 1px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; line-height: 1.7; }
.sp .tag.soon { background: var(--soon); color: #7a4f00; }

/* ค้นหา + ตัวกรอง */
.sp .sp-tools { margin-bottom: 4px; }
.sp .sp-search { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 20px; border-radius: 999px; background: #fff; cursor: text; }
.sp .sp-search:focus-within { outline: 3px solid var(--brand-dark); outline-offset: 3px; }
.sp .sp-search svg { width: 20px; height: 20px; flex: none; color: var(--mute); }
.sp .sp-search input { flex: 1; min-width: 0; padding: 12px 0; border: 0; background: none; color: inherit; font: inherit; font-size: 16px; line-height: 1.6; }
.sp .sp-search input:focus-visible { outline: 0; }
.sp .sp-search input::placeholder { color: #6b6b6b; }
.sp .sp-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.sp .sp-chip { min-height: 44px; padding: 6px 16px; border: 0; border-radius: 999px; background: #fff; color: inherit; font: inherit; font-size: 15px; line-height: 1.6; cursor: pointer; }
.sp .sp-chip b { margin-left: 6px; color: var(--mute); font-weight: 400; }
.sp .sp-chip:hover { background: var(--soft); }
.sp .sp-chip[aria-pressed="true"] { background: var(--brand); color: #fff; }
.sp .sp-chip[aria-pressed="true"] b { color: #fff; }
.sp .sp-count { margin: 10px 0 14px; color: var(--mute); font-size: 14px; }

/* กล่องจองเข้าชม */
.sp .sp-hero { display: grid; grid-template-columns: 1fr; gap: 10px; padding: clamp(20px, 2.4vw, 36px); border-radius: 18px; background: var(--brand); color: #fff; }
.sp .sp-hero .k { margin: 0; color: #fff; font-size: 14px; }
.sp .sp-hero h2 { margin: 0 0 4px; color: #fff; font-size: clamp(22px, 1rem + 1vw, 32px); line-height: 1.5; }
.sp .sp-hero p { margin: 0 0 18px; color: #fff; font-size: clamp(15px, .85rem + .3vw, 18px); }
.sp .sp-hero .pic { order: -1; display: grid; place-items: center; width: 84px; height: 84px; border-radius: 50%; background: #b47fba; }
.sp .sp-hero .pic img { width: 56px; height: 56px; }
.sp .sp-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 22px; border-radius: 999px; background: #fff; color: var(--brand-dark) !important; font-weight: 700; line-height: 1.6; }
.sp .sp-btn:hover { background: var(--soft); }
.sp .sp-hero .sp-btn:focus-visible { outline-color: #fff; }

/* การ์ดคลังตัวอย่าง / บริการวิชาการ */
.sp .sp-duo { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 12px; }
.sp .sp-tile { display: flex; align-items: flex-start; gap: 16px; padding: clamp(16px, 1.6vw, 24px); border-radius: 16px; background: #fff; color: inherit !important; }
.sp .sp-tile:hover { background: var(--soft); }
.sp .sp-tile .ico { width: 60px; height: 60px; }
.sp .sp-tile .ico img { width: 44px; height: 44px; }
.sp .sp-tile .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sp .sp-tile h3 { margin: 2px 0 2px; font-size: clamp(17px, .9rem + .3vw, 20px); }
.sp .sp-tile p { margin: 0 0 8px; color: #3c3c3c; font-size: 15px; }

/* รายการระบบบุคลากร / เร็วๆ นี้ */
.sp .sec-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; margin: calc(var(--sp) * 1.1) 0 12px; }
.sp .sec-h h2 { margin: 0; font-size: clamp(19px, .95rem + .4vw, 22px); }
.sp .sec-h p { margin: 0; color: var(--mute); font-size: 14px; }
.sp .sp-list { display: grid; gap: 2px; border-radius: 16px; overflow: hidden; }
.sp .sp-row { display: flex; align-items: center; gap: 14px; min-height: 44px; padding: 12px 18px 12px 14px; background: #fff; color: inherit !important; }
.sp a.sp-row:hover { background: var(--soft); }
.sp .sp-row .ico { width: 48px; height: 48px; border-radius: 12px; }
.sp .sp-row .ico img { width: 36px; height: 36px; }
.sp .sp-row .txt { flex: 1; min-width: 0; }
.sp .sp-row h3 { margin: 0; font-size: 16px; }
.sp .sp-row p { margin: 0; color: var(--mute); font-size: 14px; }
.sp .sp-row.soon { cursor: default; }
.sp .sp-row.soon h3 { color: #3c3c3c; }

.sp .sp-empty { margin: 4px 0 0; padding: 28px; border-radius: 14px; background: #fff; color: var(--mute); text-align: center; }
.sp .sp-empty p { margin: 0 0 12px; }
.sp .sp-empty .sp-chip { background: var(--soft); color: var(--brand-dark); font-weight: 700; }
.sp .sp-empty .sp-chip:hover { background: #ead9ec; }
.sp .sp-help { margin-top: calc(var(--sp) * 1.1); padding: 20px 24px; border-radius: 12px; background: var(--soft); }
.sp .sp-help h2 { margin: 0 0 4px; font-size: 18px; }
.sp .sp-help p { margin: 0; color: #3c3c3c; }
.sp .sp-help a { color: var(--brand-dark); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }

@container (min-width: 560px) {
  .sp .sp-hero { grid-template-columns: 1fr auto; align-items: center; gap: 24px; }
  .sp .sp-hero .pic { order: 0; width: clamp(120px, 14cqi, 160px); height: clamp(120px, 14cqi, 160px); }
  .sp .sp-hero .pic img { width: 60%; height: 60%; }
  .sp .sp-duo { grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
  .sp .sp-duo.one { grid-template-columns: 1fr; }
  /* สามการ์ด: ใบสุดท้ายเต็มแถวเมื่อพื้นที่ยังแคบ ไม่ให้เหลือช่องว่าง */
  .sp .sp-duo:not([data-vis]) > :last-child:nth-child(3), .sp .sp-duo[data-vis="3"] > :last-child { grid-column: 1 / -1; }
  .sp .sp-tile .ico { width: 76px; height: 76px; }
  .sp .sp-tile .ico img { width: 56px; height: 56px; }
  .sp .sp-row { padding: 12px 22px 12px 16px; }
}
@container (min-width: 880px) {
  .sp .sp-duo:not([data-vis]), .sp .sp-duo[data-vis="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sp .sp-duo:not([data-vis]) > :last-child:nth-child(3), .sp .sp-duo[data-vis="3"] > :last-child { grid-column: auto; }
}

/* ลิงก์ที่บุคลากรใช้บ่อย (.ql) จากต้นแบบ /workspace/psunhm-systems 4 พ.ย. 2569 · โลโก้ใน assets/img/ql-logos/ */
.ql{max-width:1200px;margin:40px auto 0;font-family:"LINE Seed Sans TH",sans-serif;line-height:1.75}
.ql .sec-h h2{margin:0;font-size:clamp(22px,1rem+1vw,30px);color:#7d4485;line-height:1.5}.ql .sec-h p{margin:4px 0 8px;color:#666}
.ql-g{margin:24px 0 10px;font-size:17px;color:#333}
.ql-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:10px}
.ql-i{display:flex;gap:12px;align-items:center;padding:14px 16px;border-radius:14px;background:#fff;color:inherit;text-decoration:none}
.ql-i:hover{background:#f4ecf5}.ql-b{flex:none;width:40px;height:40px;border-radius:12px;background:#fff;display:grid;place-items:center}.ql-b img{width:40px;height:40px;object-fit:contain;display:block}
.ql-i b{display:block;font-size:15px;line-height:1.6}.ql-i small{display:block;color:#777;font-size:13px;line-height:1.6}
.ql-i em{display:inline-block;margin-top:2px;padding:0 8px;border-radius:99px;background:#fff4dc;color:#7a4f00;font-size:12px;font-style:normal}
@media(max-width:600px){.ql-grid{grid-template-columns:1fr 1fr}.ql-i{flex-direction:column;align-items:flex-start}}
