/* การวิจัยสถาบัน — โทนจากแถบปุ่ม #124273 / ขอบ #0f4174 */
.ir-page {
  background: #f3f7fb;
  color: #16324d;
  font-family: "Prompt", sans-serif;
  padding-bottom: 72px;
}

.ir-page * { box-sizing: border-box; }

.ir-hero {
  background:
    radial-gradient(820px 320px at 100% 0%, rgba(255, 255, 255, 0.16), transparent 58%),
    linear-gradient(155deg, #0f4174 0%, #124273 52%, #0c3258 100%);
  color: #ffffff;
  padding: 36px 0 84px;
}

.ir-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 32px;
  align-items: center;
}

.ir-kicker {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.82);
}

.ir-hero h1 {
  margin: 0;
  font-size: 40px;
  font-weight: 700;
  line-height: 1.25;
  color: #ffffff;
}

.ir-lead {
  margin: 12px 0 0;
  font-size: 18px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.94);
}

.ir-hero-note {
  margin: 10px 0 0;
  max-width: 640px;
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.82);
}
.ir-staff-link {
  display: inline-block;
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  font-weight: 600;
  text-decoration: underline;
}

.ir-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.ir-stats li {
  min-width: 140px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.ir-stats strong {
  display: block;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.1;
  color: #ffffff;
}

.ir-stats span {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.84);
}

.ir-hero-card {
  width: 100%;
  max-height: 300px;
  object-fit: contain;
  filter: drop-shadow(0 16px 28px rgba(0, 0, 0, 0.28));
}

.ir-wrap { margin-top: -52px; }

.ir-dock {
  background: #ffffff;
  border: 1px solid #d7e5f1;
  border-radius: 18px;
  box-shadow: 0 14px 36px rgba(18, 66, 115, 0.12);
  padding: 20px 22px 16px;
}

.ir-label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #124273;
}

.ir-search {
  display: flex;
  gap: 10px;
}

.ir-search input[type="search"] {
  flex: 1;
  min-width: 0;
  height: 52px;
  padding: 0 16px;
  border: 1.5px solid #c5d7e8;
  border-radius: 12px;
  background: #f8fbfe;
  color: #16324d;
  font-family: "Prompt", sans-serif;
  font-size: 16px;
}

.ir-search input[type="search"]::placeholder { color: #7d93a8; }

.ir-search input[type="search"]:focus {
  border-color: #124273;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(18, 66, 115, 0.15);
  outline: none;
}

.ir-page button {
  font-family: "Prompt", sans-serif;
}

.ir-search button {
  height: 52px;
  padding: 0 22px;
  border: 0;
  border-radius: 12px;
  background: #124273;
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

.ir-search button:hover { background: #0f4174; }

.ir-filter { margin-top: 16px; }

.ir-filter-name {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: #3e5c78;
}

.ir-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

a.ir-chip {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 6px 14px;
  border: 1px solid #c5d7e8;
  border-radius: 999px;
  background: #ffffff;
  color: #124273;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
}

a.ir-chip:hover {
  border-color: #124273;
  background: #eef5fb;
  color: #0f4174;
  text-decoration: none;
}

a.ir-chip.is-on {
  background: #124273;
  border-color: #124273;
  color: #ffffff;
}

.ir-help {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.55;
  color: #5c7388;
}

.ir-resultbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #e4eef6;
  font-size: 14px;
  color: #3e5c78;
}

.ir-resultbar strong { color: #124273; font-weight: 600; }

a.ir-clear {
  color: #124273;
  font-weight: 600;
  text-decoration: none;
}

a.ir-clear:hover { text-decoration: underline; }

.ir-years { margin-top: 8px; }

.ir-year-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 28px 0 12px;
}

.ir-year-head h2 {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  color: #124273;
}

.ir-year-count {
  font-size: 14px;
  color: #5c7388;
}

.ir-card {
  background: #ffffff;
  border: 1px solid #dbe7f1;
  border-left: 5px solid #124273;
  border-radius: 16px;
  padding: 16px 18px 14px;
  margin-bottom: 12px;
  box-shadow: 0 6px 18px rgba(18, 66, 115, 0.05);
}

.ir-card-top {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.ir-code {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #5c7388;
}

.ir-kind {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef3f8;
  color: #3e5c78;
}

.ir-badge {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
}

.ir-badge-public { background: #e7f2fb; color: #0f4174; }
.ir-badge-staff { background: #124273; color: #ffffff; }
.ir-badge-both { background: #dce9f5; color: #0c3258; }

.ir-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.45;
  color: #12304f;
}

.ir-summary {
  margin: 0;
  font-size: 15px;
  line-height: 1.65;
  color: #2c4a64;
}

.ir-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
  color: #5c7388;
}

.ir-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

a.ir-tag {
  padding: 3px 8px;
  border-radius: 8px;
  background: #f3f7fb;
  color: #1a5a96;
  font-size: 12px;
  text-decoration: none;
}

a.ir-tag:hover { background: #e3eef8; color: #0f4174; }

.ir-card-top .ir-file,
.ir-card-top .ir-file-wait {
  margin-left: auto;
}

.ir-actions { margin-top: 12px; }

.ir-fold { display: block; }

.ir-fold summary {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 6px 14px;
  border: 1px solid #124273;
  border-radius: 10px;
  color: #124273;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  list-style: none;
}

.ir-fold summary::-webkit-details-marker { display: none; }
.ir-fold summary:hover { background: #eef5fb; }

.ir-detail {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f5f9fc;
  border: 1px solid #e1ebf3;
  font-size: 14px;
  line-height: 1.7;
  color: #16324d;
}

.ir-detail p { margin: 0 0 8px; }
.ir-detail p:last-child { margin-bottom: 0; }

.ir-file,
.ir-file-wait {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 6px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.ir-file {
  background: #124273;
  color: #ffffff;
}

.ir-file:hover { background: #0f4174; color: #ffffff; text-decoration: none; }

.ir-file-wait {
  background: #eef3f7;
  color: #5c7388;
}

.ir-empty {
  margin-top: 22px;
  padding: 28px 18px;
  text-align: center;
  background: #ffffff;
  border: 1px dashed #b7cbe0;
  border-radius: 16px;
  color: #3e5c78;
}

.ir-empty p { margin: 0 0 8px; font-size: 16px; }

.ir-page button:focus-visible,
.ir-page a:focus-visible,
.ir-page summary:focus-visible {
  outline: 3px solid #124273 !important;
  outline-offset: 2px;
}

.ir-page [hidden] { display: none !important; }

@media (max-width: 768px) {
  .ir-hero { padding: 28px 0 72px; }
  .ir-hero-grid { grid-template-columns: 1fr; }
  .ir-hero-card { max-height: 210px; justify-self: center; }
  .ir-hero h1 { font-size: 32px; }
  .ir-card-top .ir-file,
  .ir-card-top .ir-file-wait { margin-left: 0; }
  .ir-search { flex-direction: column; }
  .ir-search button { width: 100%; }
}

@media (max-width: 480px) {
  .ir-dock { padding: 16px; }
  .ir-hero h1 { font-size: 28px; }
  .ir-year-head h2 { font-size: 24px; }
  .ir-card h3 { font-size: 16px; }
  .ir-resultbar { flex-direction: column; align-items: flex-start; }
}
