/**
 * Hamed Academic Dashboard 3.2.1 — final evidence-led layout polish.
 */

/* Home: compact supporting reach map and stable three-column evidence hierarchy. */
.had-home-v320 .had-home-top{align-items:stretch!important}
.had-home-v320 .had-impact-stack,.had-home-v320 .had-news-console,.had-home-v320 .had-profile-card{height:auto!important;min-height:430px!important}
.had-home-v320 .had-profile-card{overflow:hidden!important}
.had-home-v320 .had-home-reach .had-reach-card{
  min-height:0!important;grid-template-columns:minmax(0,3fr) minmax(230px,1fr)!important;
  grid-template-rows:auto 310px!important;padding:14px!important;
}
.had-home-v320 .had-reach-map{min-height:0!important;height:310px!important;max-height:310px!important}
.had-home-v320 .had-reach-map>img{height:100%!important;max-height:310px!important}
.had-home-v320 .had-reach-metrics{min-height:0!important;height:310px!important}

/* Research projects: natural card flow with a static footer. */
.had-research-v301 .had-project-grid{grid-auto-rows:auto!important;grid-template-rows:none!important;align-items:stretch}
.had-research-v301 .had-project-card{
  display:flex!important;flex-direction:column!important;height:auto!important;min-height:285px!important;
  overflow:visible!important;position:relative!important;
}
.had-research-v301 .had-project-card>p{margin-bottom:0!important}
.had-research-v301 .had-project-role{position:static!important;flex:0 0 auto}
.had-research-v301 .had-project-card .had-tag-row{position:static!important;margin-top:auto!important;padding-top:14px!important}
.had-research-v301 .had-open-detail{position:static!important;inset:auto!important;flex:0 0 auto;margin-top:10px!important}

/* Publications: no hidden selected layer; trends for recurring activity, evidence summaries for sparse outputs. */
.had-publications-final .had-publications-layout{position:relative!important;z-index:auto!important;margin-top:0!important}
.had-publications-v301 .had-publication-overview-card{min-height:225px!important;height:auto!important;overflow:hidden!important}
.had-publication-trend-wrap{min-height:104px;display:flex;align-items:center;margin:6px 0 3px;color:var(--had-current-accent,var(--had-accent))}
.had-publication-trend{display:block;width:100%;height:104px;overflow:visible}
.had-publication-trend-baseline{stroke:#1c4659;stroke-width:1;vector-effect:non-scaling-stroke}
.had-publication-trend-line{fill:none;stroke:currentColor;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;vector-effect:non-scaling-stroke;filter:drop-shadow(0 0 4px currentColor)}
.had-publication-trend circle{fill:#041722;stroke:currentColor;stroke-width:3;vector-effect:non-scaling-stroke}
.had-publication-trend text{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;text-anchor:middle}
.had-publication-trend-value{fill:#e7fbff;font-size:13px;font-weight:800}
.had-publication-trend-year{fill:#789dab;font-size:11px;font-weight:700}
.had-publication-evidence-summary{min-height:104px;display:grid;grid-template-columns:1fr 1fr;gap:8px;align-items:center;margin:6px 0 3px}
.had-publication-evidence-summary>span{height:76px;padding:10px;display:grid;place-content:center;border:1px solid #235269;background:rgba(6,31,44,.72);text-align:center}
.had-publication-evidence-summary b{color:var(--had-current-accent,var(--had-accent));font:700 24px/1 ui-monospace,monospace}
.had-publication-evidence-summary small{margin-top:6px;color:#789dac;font:700 11px/1.25 ui-monospace,monospace;text-transform:uppercase}

/* Teaching: strict normal flow and opaque sections. */
.had-teaching-final .had-featured-course,.had-teaching-final .had-teaching-philosophy,.had-teaching-final .had-teaching-layout{
  position:relative!important;inset:auto!important;transform:none!important;z-index:auto!important;clear:both;
}
.had-teaching-final .had-featured-course,.had-teaching-final .had-teaching-philosophy{height:auto!important;min-height:0!important;background:#061d2b!important;overflow:hidden!important}
.had-teaching-final .had-teaching-philosophy{margin:0 0 12px!important;padding:16px 18px!important}
.had-teaching-final .had-teaching-layout{margin-top:0!important}

/* Credentials: content-sized panel without browser scrollbars. */
.had-credentials-v3 .had-credential-layout{height:auto!important;min-height:0!important;overflow:visible!important}
.had-credentials-v3 .had-credential-list,.had-credentials-v3 .had-credential-detail{height:auto!important;max-height:none!important;overflow:visible!important;min-width:0!important}
.had-credentials-v3 .had-credential-detail{justify-content:flex-start!important;overflow-x:hidden!important}
.had-credentials-v3 .had-credential-detail>*{max-width:100%;min-width:0;overflow-wrap:anywhere}

/* Sparse collections do not use decorative year charts. */
[data-had-collection-type="book"] .had-analytics-grid,
[data-had-collection-type="theses"] .had-analytics-grid,
[data-had-collection-type="persian-articles"] .had-analytics-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-auto-rows:auto!important}
[data-had-collection-type="book"] .had-analytics-panel,
[data-had-collection-type="theses"] .had-analytics-panel,
[data-had-collection-type="persian-articles"] .had-analytics-panel{height:auto!important;min-height:250px!important;overflow:visible!important}

/* Calibrated Europe maps for conferences and research visits. */
.had-europe-map{position:relative!important;width:100%!important;aspect-ratio:205/120;min-height:0!important;height:auto!important;max-height:none!important;overflow:hidden!important;background:#041722}
.had-europe-map>img{position:absolute;inset:0;width:100%!important;height:100%!important;object-fit:fill!important;opacity:.72!important}
.had-europe-map>.had-map-marker{z-index:4}
.had-map-context-conference>.had-map-marker>.had-map-star{font-size:20px!important}
[data-had-collection-type="conferences"] .had-analytics-grid{grid-template-columns:minmax(0,1.25fr) minmax(330px,.75fr)!important;grid-auto-rows:auto!important}
[data-had-collection-type="conferences"] .had-analytics-grid>.had-analytics-wide:first-child{grid-column:1!important;grid-row:1/3!important;min-height:0!important;height:auto!important}
[data-had-collection-type="conferences"] [data-had-conference-analytics-body="map"]{height:auto!important;min-height:0!important;overflow:visible!important}
[data-had-collection-type="conferences"] .had-map-location-list{max-height:none!important;overflow:visible!important}
[data-had-collection-type="research-visits"] .had-visit-map-panel{height:auto!important;min-height:0!important;overflow:visible!important}
[data-had-collection-type="research-visits"] .had-map-context-visits{max-width:720px;margin:0 auto;aspect-ratio:1.9/1}
[data-had-collection-type="research-visits"] .had-map-location-list{justify-content:center}

/* Media: narrative records plus compact dimensions only. */
[data-had-collection-type="media"] .had-analytics-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-auto-rows:auto!important}
[data-had-collection-type="media"] .had-media-story-panel{grid-column:1/-1!important}
[data-had-collection-type="media"] .had-media-profile-panel{height:auto!important;min-height:245px!important}

/* Editorial evidence: compact annual view and readable role list. */
[data-had-collection-type="editorial-referee"] .had-analytics-panel{height:auto!important;max-height:none!important;overflow:visible!important}
[data-had-collection-type="editorial-referee"] .had-analytics-grid{align-items:start!important;grid-auto-rows:auto!important}
[data-had-collection-type="editorial-referee"] .had-analytics-wide{min-height:0!important}
.had-editorial-year{grid-template-columns:150px minmax(0,1fr)!important;align-items:center!important;margin-top:8px}
.had-editorial-year .had-advanced-year-bars{min-height:165px!important;height:165px!important;padding-top:20px!important}
.had-editorial-role-list{display:grid;gap:1px;border:1px solid #1f5064}
.had-editorial-role-list>span{min-height:42px;padding:9px 11px;display:flex;align-items:center;justify-content:space-between;gap:12px;background:rgba(7,31,44,.78);border-bottom:1px solid #173e51}
.had-editorial-role-list>span:last-child{border-bottom:0}
.had-editorial-role-list b{font-size:13px;line-height:1.3}
.had-editorial-role-list em{color:var(--had-violet);font:750 16px/1 ui-monospace,monospace;font-style:normal}

/* Programme components start collapsed, preserving the complete record without repetition. */
.had-pedagogy-record-group:not([open])>div{display:none}

@media(max-width:1180px){
  .had-home-v320 .had-home-reach .had-reach-card{grid-template-columns:minmax(0,2fr) minmax(210px,1fr)!important}
  [data-had-collection-type="conferences"] .had-analytics-grid{grid-template-columns:1fr!important}
  [data-had-collection-type="conferences"] .had-analytics-grid>.had-analytics-wide:first-child{grid-column:1!important;grid-row:auto!important}
}
@media(max-width:900px){
  .had-home-v320 .had-impact-stack,.had-home-v320 .had-news-console,.had-home-v320 .had-profile-card{min-height:0!important}
  .had-home-v320 .had-home-reach .had-reach-card{grid-template-columns:1fr!important;grid-template-rows:auto 260px auto!important}
  .had-home-v320 .had-reach-map{height:260px!important;max-height:260px!important}
  .had-home-v320 .had-reach-metrics{height:auto!important;grid-template-columns:1fr!important}
  [data-had-collection-type="book"] .had-analytics-grid,
  [data-had-collection-type="theses"] .had-analytics-grid,
  [data-had-collection-type="persian-articles"] .had-analytics-grid,
  [data-had-collection-type="media"] .had-analytics-grid{grid-template-columns:1fr!important}
  .had-editorial-year{grid-template-columns:1fr!important}
}
