/* JSJL.net - resource portal extensions */
@charset "UTF-8";

:root {
  --c-legal: #0b4a8f;
  --c-platform: #0d7b86;
  --c-academia: #5b53a8;
  --c-calibration: #b87920;
  --c-instrument: #1c7a54;
  --c-society: #a6486b;
}

/* ---------- category entries ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.cat-card { position: relative; display: block; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 24px 22px; box-shadow: var(--shadow); transition: all .25s ease; overflow: hidden; }
.cat-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--cat-color, var(--brand)); }
.cat-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); border-color: #c5daf1; }
.cat-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cat-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 25px; color: #fff; background: var(--cat-color, var(--brand)); }
.cat-count { font-size: 12.5px; color: var(--muted); background: #f2f7fd; border: 1px solid var(--line); border-radius: 20px; padding: 3px 12px; white-space: nowrap; }
.cat-card h3 { font-size: 18px; font-weight: 700; color: var(--ink); margin-top: 16px; }
.cat-card p { font-size: 13.5px; color: var(--ink-2); line-height: 1.8; margin-top: 8px; min-height: 48px; }
.cat-more { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--cat-color, var(--brand)); font-weight: 600; margin-top: 14px; }

/* ---------- kpi strip ---------- */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 20px; position: relative; overflow: hidden; }
.kpi::after { content: ""; position: absolute; right: -28px; bottom: -36px; width: 110px; height: 110px; border-radius: 50%; background: var(--brand-light); opacity: .65; }
.kpi-num { position: relative; z-index: 1; font-size: 32px; font-weight: 800; line-height: 1.2; color: var(--brand); }
.kpi-num small { font-size: 15px; margin-left: 3px; color: var(--ink-2); font-weight: 600; }
.kpi-label { position: relative; z-index: 1; font-size: 13.5px; color: var(--ink-2); margin-top: 6px; }
.kpi-sub { position: relative; z-index: 1; font-size: 11.5px; color: var(--muted); margin-top: 4px; }

/* ---------- section note ---------- */
.section-note { font-size: 12.5px; color: var(--muted); line-height: 1.9; margin-top: 16px; display: flex; align-items: flex-start; gap: 7px; }
.section-note .icon { color: var(--accent); flex: none; margin-top: 3px; }
.notice-box { background: #fffaf0; border: 1px solid #f0dcb4; border-left: 4px solid #e0a748; border-radius: 8px; padding: 18px 22px; font-size: 13.5px; color: #6b5326; line-height: 1.95; display: flex; gap: 12px; }
.notice-box .icon { color: #c68a2c; font-size: 19px; flex: none; margin-top: 3px; }
.notice-box b { color: #8a6418; }

/* ---------- resource library ---------- */
.res-toolbar { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 22px; margin-bottom: 20px; }
.res-toolbar-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.res-toolbar-row + .res-toolbar-row { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); }
.toolbar-label { font-size: 13px; font-weight: 700; color: var(--ink-2); flex: none; min-width: 56px; }
.chip { padding: 6px 15px; border: 1px solid #d3e1f0; background: #fff; color: var(--ink-2); border-radius: 20px; font-size: 13px; transition: all .2s ease; white-space: nowrap; }
.chip:hover { border-color: var(--brand-mid); color: var(--brand); }
.chip.active { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.chip.mini { padding: 4px 11px; font-size: 12px; }
.res-search { display: flex; gap: 8px; margin-left: auto; }
.res-search input { width: 230px; height: 36px; padding: 7px 12px; border: 1px solid #d3e1f0; border-radius: 5px; background: #fbfdff; outline: none; font-size: 13.5px; }
.res-search input:focus { border-color: var(--brand-mid); box-shadow: 0 0 0 3px rgba(18,91,168,.1); }
.res-result { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.res-result b { color: var(--brand); font-size: 16px; }
.res-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.res-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 22px 18px; display: flex; flex-direction: column; border-top: 3px solid var(--cat-color, var(--brand)); transition: box-shadow .22s ease, transform .22s ease; }
.res-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); }
.res-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.res-name { font-size: 16.5px; font-weight: 700; color: var(--ink); line-height: 1.5; }
.res-badges { display: flex; gap: 6px; flex: none; flex-wrap: wrap; justify-content: flex-end; }
.badge { font-size: 11.5px; border-radius: 3px; padding: 2px 8px; white-space: nowrap; color: var(--cat-color, var(--brand)); background: #f2f7fd; border: 1px solid var(--line); }
.badge.solid { color: #fff; background: var(--cat-color, var(--brand)); border-color: transparent; }
.res-desc { font-size: 13.2px; color: var(--ink-2); line-height: 1.85; margin-top: 10px; flex: 1; }
.res-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.res-tags span { font-size: 11.5px; color: var(--ink-2); background: #f4f8fd; border: 1px solid #e6eef8; border-radius: 3px; padding: 2px 8px; }
.res-note { font-size: 11.5px; color: #a0782f; background: #fffaf0; border-radius: 4px; padding: 6px 9px; margin-top: 10px; line-height: 1.6; }
.res-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.res-source { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; min-width: 0; }
.res-source .icon { flex: none; color: var(--accent); }
.res-source span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.res-link { font-size: 12.5px; font-weight: 600; color: var(--brand); display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.res-link:hover { color: var(--brand-mid); }
.res-empty { grid-column: 1 / -1; background: #fff; border: 1px dashed #cfdcec; border-radius: var(--radius); padding: 50px 20px; text-align: center; color: var(--muted); font-size: 14px; }

/* ---------- timeline ---------- */
.tl-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }
.tl-month { display: flex; align-items: center; gap: 14px; margin: 30px 0 16px; }
.tl-month:first-child { margin-top: 0; }
.tl-month b { font-size: 19px; color: var(--brand-dark); font-weight: 800; letter-spacing: 1px; }
.tl-month i { flex: 1; height: 1px; background: linear-gradient(90deg, #c9dff5, transparent); }
.tl-month span { font-size: 12.5px; color: var(--muted); }
.tl-item { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 18px; position: relative; padding-bottom: 18px; }
.tl-item::before { content: ""; position: absolute; left: 108px; top: 22px; bottom: -4px; width: 2px; background: #e2eaf3; }
.tl-item:last-child::before { display: none; }
.tl-date { text-align: right; padding-top: 14px; position: relative; }
.tl-date b { display: block; font-size: 17px; font-weight: 800; color: var(--brand); line-height: 1.2; }
.tl-date span { font-size: 12px; color: var(--muted); }
.tl-dot { position: absolute; right: -18px; top: 18px; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 3px solid var(--brand-mid); z-index: 1; }
.tl-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 22px; transition: box-shadow .22s ease, transform .22s ease; }
.tl-card:hover { box-shadow: var(--shadow-hover); transform: translateX(3px); }
.tl-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.tl-cat { font-size: 11.5px; color: #fff; background: var(--brand); border-radius: 3px; padding: 2px 9px; }
.tl-cat.c2 { background: var(--c-platform); }
.tl-cat.c3 { background: var(--c-academia); }
.tl-cat.c4 { background: var(--c-instrument); }
.tl-cat.c5 { background: var(--c-calibration); }
.tl-city { font-size: 11.5px; color: var(--muted); background: #f2f7fd; border: 1px solid var(--line); border-radius: 3px; padding: 2px 9px; }
.tl-title { font-size: 16.5px; font-weight: 700; color: var(--ink); line-height: 1.55; }
.tl-card a.tl-title:hover { color: var(--brand-mid); }
.tl-desc { font-size: 13.2px; color: var(--ink-2); line-height: 1.85; margin-top: 8px; }
.tl-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 12px; color: var(--muted); }
.tl-meta span { display: inline-flex; align-items: center; gap: 5px; }
.tl-meta a { color: var(--brand); font-weight: 600; }
.tl-meta a:hover { text-decoration: underline; }

/* ---------- policy list ---------- */
.policy-list { display: flex; flex-direction: column; gap: 14px; }
.policy-item { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 24px; border-left: 4px solid var(--brand); }
.policy-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.policy-head h3 { font-size: 16.5px; font-weight: 700; color: var(--ink); line-height: 1.5; }
.policy-status { font-size: 11.5px; color: #a9701c; background: var(--accent-soft); border-radius: 3px; padding: 3px 10px; white-space: nowrap; }
.policy-meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin-top: 8px; }
.policy-item p { font-size: 13.3px; color: var(--ink-2); line-height: 1.9; margin-top: 10px; }
.policy-foot { margin-top: 12px; font-size: 12.5px; }

/* ---------- source list ---------- */
.source-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.source-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 13px 16px; font-size: 13.5px; color: var(--ink-2); }
.source-item:hover { border-color: #bbd4ee; box-shadow: var(--shadow); color: var(--brand); }
.source-item .stype { font-size: 11.5px; color: var(--brand); background: var(--brand-light); border-radius: 3px; padding: 2px 8px; flex: none; }
.source-item .icon { color: var(--accent); flex: none; }

/* ---------- info table ---------- */
.org-table { width: 100%; border-collapse: collapse; font-size: 13.5px; background: #fff; }
.org-table th, .org-table td { padding: 12px 14px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.org-table th { background: #eef5fd; color: var(--brand-dark); font-weight: 700; white-space: nowrap; }
.org-table td a { color: var(--brand); font-weight: 600; }
.org-table tr:hover td { background: #f9fcff; }

/* ---------- platform / academia cards ---------- */
.plat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.plat-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 24px; border-top: 3px solid var(--brand); }
.plat-card.national { border-top-color: #c68a2c; }
.plat-card h3 { font-size: 17px; font-weight: 700; color: var(--ink); line-height: 1.5; }
.plat-card .plat-tag { display: inline-block; font-size: 11.5px; color: #a9701c; background: var(--accent-soft); border-radius: 3px; padding: 2px 9px; margin-bottom: 8px; }
.plat-card p { font-size: 13.2px; color: var(--ink-2); line-height: 1.85; margin-top: 10px; }
.plat-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; padding-top: 11px; border-top: 1px dashed var(--line); font-size: 12px; color: var(--muted); }
.plat-foot a { color: var(--brand); font-weight: 600; }

/* ---------- inline helpers ---------- */
.inline-link { color: var(--brand); font-weight: 600; border-bottom: 1px dashed #a9c8e8; }
.inline-link:hover { color: var(--brand-mid); }
.text-muted { color: var(--muted); }
.mt-s { margin-top: 12px; }
.mt-m { margin-top: 22px; }
.mt-l { margin-top: 36px; }
.nowrap { white-space: nowrap; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .cat-grid, .source-grid { grid-template-columns: repeat(2, 1fr); }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .res-grid, .plat-grid { grid-template-columns: 1fr; }
  .res-search { margin-left: 0; width: 100%; }
  .res-search input { flex: 1; width: auto; }
}
@media (max-width: 620px) {
  .cat-grid, .source-grid, .kpi-grid { grid-template-columns: 1fr; }
  .res-toolbar { padding: 16px; }
  .res-card { padding: 18px 16px 16px; }
  .res-head { flex-direction: column; gap: 8px; }
  .res-badges { justify-content: flex-start; }
  .res-foot { flex-direction: column; align-items: flex-start; }
  .tl-item { grid-template-columns: 1fr; gap: 6px; }
  .tl-item::before { display: none; }
  .tl-date { text-align: left; padding-top: 0; }
  .tl-date b { display: inline; margin-right: 6px; }
  .tl-dot { display: none; }
  .tl-card { padding: 16px; }
  .policy-item { padding: 16px; }
  .org-table { font-size: 12.5px; }
}
