/* --- FONTS --- */


  /* --- SCOPED VARIABLES & RESET --- */
  :root {
    --imd-bg:        #f5f5f5;
    --imd-surface:   #ffffff;
    --imd-border:    #e5e5e5;
    --imd-text:      #1f2937;
    --imd-muted:     #374151;
    --imd-subtle:    #6b7280;
    --imd-accent:    #b45309;
    --imd-link:      #b45309;
  }

  body {
    margin: 0;
    padding: 0;
    font-family: "Inter", system-ui, -apple-system, sans-serif;
    color: var(--imd-muted);
    background: var(--imd-bg);
    line-height: 1.6;
    overflow-x: hidden;
  }

  * { box-sizing: border-box; }

  a { text-decoration: none; color: inherit; transition: color 0.2s; }
  a:hover { color: var(--imd-accent); }

  /* --- LAYOUT UTILITIES --- */
  .imd-container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
    position: relative;
    z-index: 10;
  }

  /* --- SECTIONS --- */
  .imd-section {
    padding: 1.5rem 0;
    background: var(--imd-surface);
    border-bottom: 1px solid var(--imd-border);
  }

  .imd-section:nth-child(even) {
    background: var(--imd-bg);
  }

  .imd-content-header {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--imd-accent);
    text-align: left;
  }

  .imd-content-header h2 {
    margin: 0;
    font-family: "Merriweather", serif;
    font-size: 1.8rem;
    color: #0000FF;
    line-height: 1.3;
  }

  .imd-text-block {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--imd-text);
    text-align: justify;
    margin-bottom: 1.5rem;
  }

  .imd-text-block a {
    color: var(--imd-accent);
    text-decoration: underline;
    font-weight: 500;
  }

  /* --- INFO LAYOUT (Logo + Grid) --- */
  .imd-info-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    align-items: stretch;
  }

  /* Logo Card */
  .imd-logo-card {
    background: #fff;
    border: 1px solid var(--imd-border);
    border-radius: 1rem;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  }

  .imd-project-logo {
    max-width: 100%;
    max-height: 120px;
    width: auto;
    object-fit: contain;
  }

  .imd-logo-card--uio {
    background: #2b4c7e;
    border-color: #2b4c7e;
    min-height: 170px;
    align-items: center;
    justify-content: center;
  }

  .imd-uio-logo-img {
    width: 210px;
    max-width: 100%;
    height: auto;
    object-fit: contain;
  }

  /* Details Grid */
  .imd-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.8rem;
  }

  .imd-detail-card {
    background: var(--imd-surface);
    border: 1px solid var(--imd-border);
    border-radius: 0.8rem;
    padding: 0.8rem;
    text-align: left;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .imd-detail-card:hover {
    border-color: var(--imd-accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
  }

  .imd-detail-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--imd-subtle);
    font-weight: 700;
    margin-bottom: 0.3rem;
  }

  .imd-detail-value {
    font-size: 1.05rem;
    color: var(--imd-text);
    font-weight: 600;
    line-height: 1.4;
  }

  .imd-detail-value a {
    color: var(--imd-accent);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
  }

  .imd-detail-value a:hover {
    border-bottom-color: var(--imd-accent);
  }

  .imd-detail-note {
    font-size: 0.85em;
    color: var(--imd-subtle);
    font-weight: 400;
    margin-top: 2px;
  }

  /* --- PAPER LIST --- */
  .imd-paper-label {
    font-family: "Merriweather", serif;
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
    color: #111;
    border-bottom: 1px solid var(--imd-border);
    padding-bottom: 0.4rem;
    display: inline-block;
  }

  .imd-paper-list {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: paper-counter;
  }

  .imd-paper-item {
    margin-bottom: 0.8rem;
    font-size: 1rem;
    color: var(--imd-muted);
    position: relative;
    padding-left: 2rem;
    text-align: justify;
    line-height: 1.5;
  }

  .imd-paper-item::before {
    counter-increment: paper-counter;
    content: counter(paper-counter) ".";
    color: var(--imd-accent);
    position: absolute;
    left: 0;
    font-weight: bold;
    font-size: 1.1rem;
    line-height: 1.5;
  }

  .imd-paper-item a {
    font-weight: 600;
    color: var(--imd-text);
    border-bottom: 1px solid rgba(180, 83, 9, 0.3);
  }

  .imd-paper-item a:hover {
    border-bottom-color: var(--imd-accent);
  }

  /* --- RESPONSIVE --- */
  @media (max-width: 900px) {
    .imd-info-layout {
      grid-template-columns: 1fr;
      gap: 1rem;
    }
    .imd-logo-card {
      padding: 1rem;
      justify-content: flex-start;
    }
    .imd-project-logo {
      max-height: 80px;
    }
  }

  @media (max-width: 520px) {
    .imd-container {
      padding: 0 1rem;
    }
    .imd-content-header h2 {
      font-size: 1.45rem;
    }
    .imd-text-block {
      font-size: 1rem;
      text-align: left;
    }
    .imd-uio-logo-img {
      max-width: 180px;
      width: 100%;
    }
  }

/* Detailed allocations keep the shared funding typography and open layout. */
.computational-allocation .compute-metadata-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.computational-allocation .allocation-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0 12px;
  font-size: 16px;
  line-height: 1.6;
  color: #1f2937;
}
.computational-allocation .allocation-table caption {
  text-align: left;
  font: 700 21px/1.35 Georgia, 'Times New Roman', serif;
  color: #18212b;
  padding-bottom: 14px;
}
.computational-allocation .allocation-table th,
.computational-allocation .allocation-table td {
  padding: 12px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid #e1e2df;
}
.computational-allocation .allocation-table th:first-child {
  padding-left: 0;
}
.computational-allocation .allocation-table thead th {
  font: 700 12px/1.6 Arial, Helvetica, sans-serif;
  color: #8d3818;
  text-transform: uppercase;
  letter-spacing: .5px;
  border-top: 2px solid #a34d25;
}
.computational-allocation .allocation-table tbody th {font-weight: 600;}
.computational-allocation .allocation-table td:last-child {white-space: nowrap;}
.computational-allocation .allocation-note {font-size: 14px;line-height: 1.65;margin: 12px 0 0;color: #676b6f;}
@media (max-width: 680px) {
  .computational-allocation .allocation-table {display: block;}
  .computational-allocation .allocation-table caption {display: block;}
  .computational-allocation .allocation-table thead {position: absolute;width: 1px;height: 1px;padding: 0;overflow: hidden;clip-path: inset(50%);}
  .computational-allocation .allocation-table tbody {display: block;}
  .computational-allocation .allocation-table tr {display: block;padding: 14px 0;border-top: 1px solid #e1e2df;}
  .computational-allocation .allocation-table th,
  .computational-allocation .allocation-table td {display: block;border: 0;padding: 3px 0;font-size: 15px;}
  .computational-allocation .allocation-table td::before {content: attr(data-label) ': ';font-weight: 600;}
  .computational-allocation .allocation-table tbody th {font-size: 16px;margin-bottom: 3px;}
}
@media (max-width: 480px) {
  .computational-allocation .compute-metadata-grid {grid-template-columns: 1fr;}
}
