
/* HPDCR redesign v2 - premium supercomputing research laboratory */
/* Wide full-page. CSS-only. Delete custom header.tpl if it exists. */

:root {
  --hpd-bg: #eef4fb;
  --hpd-ink: #0d1b2a;
  --hpd-muted: #52657a;
  --hpd-blue: #0b5cab;
  --hpd-deep: #09233f;
  --hpd-sky: #dcecff;
  --hpd-line: #c6d6e6;
  --hpd-white: #ffffff;
  --hpd-accent: #2aa7ff;
}

html,
body {
  background: var(--hpd-bg) !important;
  color: var(--hpd-ink) !important;
}

.pkp_structure_page {
  background: var(--hpd-bg) !important;
}

.pkp_structure_content {
  max-width: none !important;
  width: calc(100% - 64px) !important;
  margin: 0 32px !important;
  padding: 34px 0 58px !important;
  background: transparent !important;
}

.pkp_structure_main {
  width: 100% !important;
  max-width: none !important;
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
}

.pkp_structure_sidebar {
  display: none !important;
}

/* Distinct clean supercomputing header */
.pkp_head_wrapper,
.pkp_site_name_wrapper {
  background: var(--hpd-white) !important;
}

.pkp_site_name {
  background:
    linear-gradient(90deg, #ffffff 0%, #eef6ff 70%, #ffffff 100%) !important;
  border-bottom: 1px solid var(--hpd-line) !important;
}

.pkp_site_name a,
.pkp_site_name .is_text {
  color: var(--hpd-deep) !important;
  font-weight: 950 !important;
  letter-spacing: -0.6px !important;
}

.pkp_navigation_primary_row {
  background: var(--hpd-deep) !important;
  border-bottom: 5px solid var(--hpd-accent) !important;
}

.pkp_navigation_primary > li > a {
  color: #ffffff !important;
  font-weight: 850 !important;
  font-size: 13px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.4px !important;
}

.pkp_navigation_user > li > a {
  color: var(--hpd-blue) !important;
  font-weight: 800 !important;
}

.pkp_page_index .current_issue {
  display: none !important;
}

.pkp_page_index .page_index_journal > h1,
.pkp_page_index .additional_content > h2 {
  display: none !important;
}

.pkp_page_index .additional_content {
  margin: 0 !important;
  padding: 0 !important;
}

/* Remove artifacts */
body::before,
body::after,
.pkp_structure_page::before,
.pkp_structure_page::after,
.pkp_structure_content::before,
.pkp_structure_content::after,
.pkp_structure_main::before,
.pkp_structure_main::after,
.page_index_journal::before,
.page_index_journal::after,
.additional_content::before,
.additional_content::after {
  display: none !important;
  content: none !important;
  background: none !important;
  border: 0 !important;
}

/* HPDCR v2 page */
.hpd2-home {
  width: 100% !important;
  max-width: none !important;
}

.hpd2-lab-sheet {
  background: var(--hpd-white);
  border: 1px solid var(--hpd-line);
  box-shadow: 0 18px 48px rgba(9,35,63,0.10);
}

.hpd2-topline {
  display: grid;
  grid-template-columns: 1fr repeat(4, 190px);
  border-bottom: 1px solid var(--hpd-line);
}

.hpd2-name {
  padding: 24px 30px;
  border-left: 8px solid var(--hpd-blue);
}

.hpd2-name span {
  display: block;
  color: var(--hpd-blue);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: 12px;
  font-weight: 950;
  margin-bottom: 8px;
}

.hpd2-name strong {
  display: block;
  color: var(--hpd-deep);
  font-size: 28px;
  line-height: 1.18;
  font-weight: 950;
}

.hpd2-metric {
  padding: 24px 20px;
  border-left: 1px solid var(--hpd-line);
  background: #f7fbff;
}

.hpd2-metric span {
  display: block;
  color: var(--hpd-muted);
  text-transform: uppercase;
  letter-spacing: 1.1px;
  font-size: 11px;
  font-weight: 950;
  margin-bottom: 7px;
}

.hpd2-metric strong {
  color: var(--hpd-blue);
  font-size: 22px;
  font-weight: 950;
}

.hpd2-abstract {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  min-height: 410px;
}

.hpd2-abstract-left {
  background:
    linear-gradient(rgba(11,92,171,0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11,92,171,0.08) 1px, transparent 1px),
    var(--hpd-sky);
  background-size: 36px 36px;
  padding: 46px 44px;
  display: grid;
  align-content: center;
}

.hpd2-abstract-left h1 {
  margin: 0;
  color: var(--hpd-deep);
  font-size: clamp(42px, 5vw, 76px);
  line-height: 0.98;
  letter-spacing: -2.6px;
  font-weight: 950;
}

.hpd2-abstract-right {
  padding: 48px 46px;
  display: grid;
  align-content: center;
  border-left: 1px solid var(--hpd-line);
}

.hpd2-abstract-right p {
  margin: 0;
  color: var(--hpd-muted);
  font-size: 19px;
  line-height: 1.78;
}

.hpd2-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hpd2-actions a {
  text-decoration: none !important;
  font-weight: 950;
  padding: 14px 18px;
  border: 2px solid var(--hpd-blue);
}

.hpd2-actions .primary {
  background: var(--hpd-blue);
  color: #ffffff !important;
}

.hpd2-actions .secondary {
  background: #ffffff;
  color: var(--hpd-blue) !important;
}

.hpd2-flow {
  margin: 32px 0;
  display: grid;
  grid-template-columns: 280px 1fr;
  border: 1px solid var(--hpd-line);
  background: var(--hpd-white);
}

.hpd2-flow-title {
  background: var(--hpd-deep);
  color: #ffffff;
  padding: 32px;
}

.hpd2-flow-title span {
  display: block;
  color: var(--hpd-accent);
  text-transform: uppercase;
  letter-spacing: 1.4px;
  font-size: 12px;
  font-weight: 950;
  margin-bottom: 12px;
}

.hpd2-flow-title h2 {
  margin: 0;
  color: #ffffff;
  font-size: 30px;
  line-height: 1.15;
  font-weight: 950;
}

.hpd2-flow-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.hpd2-flow-item {
  padding: 28px;
  border-right: 1px solid var(--hpd-line);
}

.hpd2-flow-item:last-child {
  border-right: 0;
}

.hpd2-flow-item b {
  display: block;
  color: var(--hpd-blue);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.hpd2-flow-item h3 {
  margin: 0 0 10px;
  color: var(--hpd-deep);
  font-size: 21px;
}

.hpd2-flow-item p {
  margin: 0;
  color: var(--hpd-muted);
  line-height: 1.62;
}

.hpd2-map {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  border: 1px solid var(--hpd-line);
  background: var(--hpd-white);
  margin: 32px 0;
}

.hpd2-map-head {
  grid-column: 1 / -1;
  padding: 24px 28px;
  background: #f7fbff;
  border-bottom: 1px solid var(--hpd-line);
}

.hpd2-map-head span {
  display: block;
  color: var(--hpd-blue);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: 12px;
  font-weight: 950;
  margin-bottom: 8px;
}

.hpd2-map-head h2 {
  margin: 0;
  color: var(--hpd-deep);
  font-size: 30px;
  font-weight: 950;
}

.hpd2-scope {
  padding: 18px;
  min-height: 118px;
  border-right: 1px solid var(--hpd-line);
  border-bottom: 1px solid var(--hpd-line);
  color: var(--hpd-deep);
  font-weight: 900;
  display: flex;
  align-items: flex-end;
  background:
    linear-gradient(135deg, transparent 0%, transparent 60%, rgba(42,167,255,0.12) 60%, rgba(42,167,255,0.12) 100%);
}

.hpd2-scope:nth-child(6n + 1) {
  border-right: 0;
}

.hpd2-review-policy {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 32px 0;
}

.hpd2-review,
.hpd2-policy {
  background: var(--hpd-white);
  border: 1px solid var(--hpd-line);
  padding: 30px;
}

.hpd2-review h2,
.hpd2-policy h2 {
  margin: 0 0 18px;
  color: var(--hpd-deep);
  font-size: 28px;
  font-weight: 950;
}

.hpd2-review ol {
  margin: 0;
  padding-left: 20px;
  color: var(--hpd-muted);
  line-height: 1.85;
}

.hpd2-policy-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border: 1px solid var(--hpd-line);
}

.hpd2-policy-links a {
  color: var(--hpd-deep) !important;
  text-decoration: none !important;
  padding: 14px;
  border-right: 1px solid var(--hpd-line);
  border-bottom: 1px solid var(--hpd-line);
  font-weight: 850;
}

.hpd2-policy-links a:nth-child(2n) {
  border-right: 0;
}

.hpd2-policy-links a:hover {
  background: var(--hpd-sky);
  color: var(--hpd-blue) !important;
}

.hpd2-submit {
  background: var(--hpd-deep);
  color: #ffffff;
  padding: 34px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  border-bottom: 6px solid var(--hpd-accent);
}

.hpd2-submit h2 {
  margin: 0 0 8px;
  color: #ffffff;
  font-size: 30px;
  font-weight: 950;
}

.hpd2-submit p {
  margin: 0;
  color: rgba(255,255,255,0.78);
  line-height: 1.6;
}

.hpd2-submit a {
  background: var(--hpd-accent);
  color: #ffffff !important;
  text-decoration: none !important;
  padding: 14px 19px;
  font-weight: 950;
  white-space: nowrap;
}

@media (max-width: 980px) {
  .pkp_structure_content {
    width: calc(100% - 28px) !important;
    margin: 0 14px !important;
  }

  .hpd2-topline,
  .hpd2-abstract,
  .hpd2-flow,
  .hpd2-review-policy,
  .hpd2-submit {
    grid-template-columns: 1fr;
  }

  .hpd2-flow-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hpd2-map {
    grid-template-columns: repeat(2, 1fr);
  }

  .hpd2-abstract-right {
    border-left: 0;
    border-top: 1px solid var(--hpd-line);
  }
}

@media (max-width: 640px) {
  .hpd2-abstract-left,
  .hpd2-abstract-right {
    padding: 30px 24px;
  }

  .hpd2-abstract-left h1 {
    font-size: 38px;
  }

  .hpd2-flow-grid,
  .hpd2-policy-links,
  .hpd2-map {
    grid-template-columns: 1fr;
  }

  .hpd2-flow-item,
  .hpd2-policy-links a,
  .hpd2-scope {
    border-right: 0 !important;
  }
}

/* HPDCR final cleanup: hide OJS issue links and fix metric spacing */
.pkp_page_index .current_issue,
.pkp_page_index .current_issue_title,
.pkp_page_index .current_issue_title + .obj_issue_toc,
.pkp_page_index .obj_issue_toc,
.pkp_page_index .cmp_button_wire,
.pkp_page_index .read_more,
.pkp_page_index .page_index_journal > .cmp_button,
.pkp_page_index .page_index_journal > a[href*="issue/archive"],
.pkp_page_index .page_index_journal > a[href*="issues"] {
  display: none !important;
}

.hpd2-metric {
  display: block !important;
  padding: 24px 26px !important;
}

.hpd2-metric span {
  display: block !important;
  margin-bottom: 12px !important;
  line-height: 1.2 !important;
}

.hpd2-metric strong {
  display: block !important;
  margin-top: 0 !important;
  line-height: 1.2 !important;
  white-space: normal !important;
}

.hpd2-topline {
  grid-template-columns: minmax(520px, 1fr) repeat(4, minmax(160px, 210px)) !important;
}

.hpd2-name {
  padding: 28px 34px !important;
}

.hpd2-name span {
  display: block !important;
  margin-bottom: 10px !important;
}

.hpd2-name strong {
  display: block !important;
  line-height: 1.18 !important;
}

@media (max-width: 1200px) {
  .hpd2-topline {
    grid-template-columns: 1fr 1fr !important;
  }
}

@media (max-width: 700px) {
  .hpd2-topline {
    grid-template-columns: 1fr !important;
  }
}
