/**
 * Hamed Academic Dashboard 3.2.0
 * Evidence-led final interface and accessibility corrections.
 */

/* ---------- Readability and interaction baseline ---------- */
body.had-theme{
  font-size:15px!important;
  line-height:1.55;
  text-rendering:optimizeLegibility;
}
body.had-theme :where(button,input,select,textarea,a){font-size:max(13px,1em)}
body.had-theme :where(p,li,dd,.had-record-row p,.had-story-copy>p){font-size:14px;line-height:1.55}
body.had-theme :where(.had-kicker,.had-side-label,.had-panel-title small,.had-section-title>span,.had-analytics-title>span,.had-collection-kpis small,.had-profile-telemetry small,.had-signal-line,.had-record-row label,.had-record-row time small){font-size:12px!important;line-height:1.35}
body.had-theme :where(.had-sidebar a,.had-top-links a,.had-language-switch button,.had-year-filter button,.had-search-box input,.had-profile-actions a,.had-home-primary-links a){font-size:13px!important}
body.had-theme :where(a,button,input,select,textarea,summary):focus-visible{
  outline:2px solid var(--had-cyan)!important;
  outline-offset:3px!important;
}
.had-skip-link{
  position:fixed;left:16px;top:8px;z-index:99999;
  padding:10px 14px;background:#eefcff;color:#00131f;border:2px solid var(--had-cyan);
  transform:translateY(-160%);transition:transform .16s;text-decoration:none;font-weight:800;
}
.had-skip-link:focus{transform:translateY(0)}

/* ---------- Top news strip ---------- */
.had-top-stream{font-size:12px!important;gap:8px}
.had-top-stream-item,.had-top-stream em,.had-top-stream-item span{font-size:12px!important;line-height:1.25}
.had-top-stream-item em{gap:9px;margin-right:46px}
.had-stream-toggle{
  flex:0 0 34px;width:34px;height:34px;display:grid;place-items:center;
  border:1px solid #24556d;border-radius:4px;background:#061722;color:#9bd9e6;
}
.had-stream-toggle:hover{border-color:var(--had-cyan);color:var(--had-cyan)}
.had-stream-toggle .dashicons{font-size:17px;width:17px;height:17px}

/* ---------- Collapsible evidence navigation ---------- */
.had-side-scroll{display:flex;flex-direction:column;gap:5px;padding-top:9px}
.had-side-group{border-top:1px solid rgba(50,111,139,.34);padding-top:5px}
.had-side-group-toggle{
  width:100%;min-height:42px;padding:7px 9px;display:flex;align-items:center;justify-content:space-between;gap:8px;
  border:0;background:transparent;color:#8cabb9;text-align:left;font:700 12px/1.25 ui-monospace,monospace;letter-spacing:.075em;text-transform:uppercase;
}
.had-side-group-toggle>span{display:flex;align-items:center;gap:9px;min-width:0}
.had-side-group-toggle .dashicons{width:16px;height:16px;font-size:16px;color:#79a9bb}
.had-side-group-toggle>.dashicons{transition:transform .18s ease}
.had-side-group.is-open .had-side-group-toggle>.dashicons{transform:rotate(180deg)}
.had-side-group-toggle:hover{color:#eafaff;background:rgba(22,67,87,.35)}
.had-side-group-panel{display:grid;gap:2px;padding:2px 0 7px}
.had-side-group-panel[hidden]{display:none!important}
.had-side-group-panel a{min-height:40px!important}

/* ---------- Home: guaranteed normal document flow ---------- */
.had-home-final{
  display:block!important;
  min-height:0!important;
  height:auto!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  padding-bottom:24px;
}
.had-home-final>*{position:relative!important;inset:auto!important;transform:none!important;z-index:auto!important}
.had-home-final .had-home-top{
  display:grid!important;
  grid-template-columns:minmax(480px,40fr) minmax(360px,35fr) minmax(300px,25fr)!important;
  align-items:stretch!important;
  gap:12px!important;
  min-height:430px!important;
  height:auto!important;
}
.had-home-final .had-home-top>*{min-width:0;position:relative!important;inset:auto!important;z-index:auto!important}
.had-home-final .had-profile-card{
  min-height:430px!important;height:auto!important;
  grid-template-columns:minmax(170px,34%) minmax(0,1fr)!important;
  grid-template-rows:minmax(0,1fr) 42px!important;
}
.had-home-final .had-profile-copy{padding:22px 20px 18px!important;overflow:visible!important}
.had-home-final .had-profile-copy h1{font-size:clamp(27px,2.1vw,39px)!important;line-height:1.08;margin:9px 0 5px}
.had-home-final .had-profile-role{font-size:14px!important;color:#61dff0;margin:0 0 12px}
.had-home-final .had-profile-summary{font-size:15px!important;line-height:1.55;margin:0 0 13px;color:#b9d0da}
.had-home-primary-links{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin:12px 0 13px}
.had-home-primary-links a{
  min-width:0;min-height:44px;padding:8px 9px;display:flex;align-items:center;justify-content:space-between;gap:5px;
  border:1px solid #245a70;border-radius:5px;background:rgba(11,48,66,.47);text-decoration:none;font-weight:750;line-height:1.18;
}
.had-home-primary-links a:hover{border-color:var(--had-cyan);background:rgba(16,82,103,.44)}
.had-home-primary-links .dashicons{width:15px;height:15px;font-size:15px;flex:0 0 auto}
.had-home-final .had-profile-telemetry{margin-top:auto}
.had-home-final .had-profile-telemetry b{font-size:20px!important}
.had-home-final .had-profile-actions{margin-top:12px}
.had-home-final .had-profile-actions a{min-height:40px;padding:0 13px}
.had-home-final .had-portrait{user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
.had-home-final .had-protected-portrait-image{pointer-events:none}
.had-home-final .had-news-console,
.had-home-final .had-impact-stack,
.had-home-final .had-impact-stack .had-scholar-card{min-height:430px!important;height:auto!important}
.had-home-final .had-news-item h3{font-size:clamp(22px,1.8vw,31px)!important;line-height:1.18}
.had-home-final .had-news-item p{font-size:14px!important}
.had-home-final .had-news-item>b{font-size:13px!important}
.had-news-pause{width:34px;height:34px;display:grid;place-items:center;border:1px solid #2b6179;background:#061722;color:#9ad9e8}
.had-news-pause .dashicons{width:16px;height:16px;font-size:16px}

/* Google Scholar: labels stay above bars and never collide. */
.had-home-final .had-scholar-card{padding:16px!important;grid-template-rows:auto auto minmax(170px,1fr) auto!important}
.had-home-final .had-scholar-card h2{font-size:20px!important}
.had-home-final .had-scholar-kpis{gap:0;min-height:78px}
.had-home-final .had-scholar-kpis span{min-width:0;padding:9px}
.had-home-final .had-scholar-kpis b{font-size:22px!important}
.had-home-final .had-scholar-kpis em{font-size:11px!important;white-space:normal}
.had-home-final .had-micro-chart{min-height:180px!important;align-items:flex-end!important;padding:36px 6px 28px!important;overflow:visible!important}
.had-home-final .had-micro-chart>i{position:relative;min-width:14px}
.had-home-final .had-micro-chart>i>em{position:absolute!important;top:-23px!important;left:50%!important;transform:translateX(-50%)!important;z-index:2!important;font-size:11px!important;background:#052131;padding:1px 3px;border-radius:3px}
.had-home-final .had-micro-chart>i>small{font-size:11px!important}

/* Global Reach: full-width, contained, no overlay. */
.had-home-final .had-home-reach{
  display:block!important;position:relative!important;inset:auto!important;z-index:auto!important;
  width:100%!important;min-width:0!important;min-height:0!important;height:auto!important;
  margin:12px 0!important;overflow:hidden!important;
}
.had-home-final .had-home-reach .had-reach-card{
  position:relative!important;inset:auto!important;z-index:auto!important;transform:none!important;
  width:100%!important;min-height:390px!important;height:auto!important;
  padding:16px!important;display:grid!important;
  grid-template-columns:minmax(0,3fr) minmax(240px,1fr)!important;
  grid-template-rows:auto minmax(300px,360px)!important;
  gap:12px 18px!important;overflow:hidden!important;
}
.had-home-final .had-reach-head{grid-column:1/-1;min-height:48px}
.had-home-final .had-reach-head h2{font-size:22px!important}
.had-home-final .had-reach-map{
  position:relative!important;inset:auto!important;z-index:1!important;width:100%!important;
  min-height:300px!important;height:100%!important;max-height:360px!important;overflow:hidden!important;
  border:1px solid #23536a;background:radial-gradient(circle at 55% 40%,rgba(22,187,219,.15),transparent 42%),#031521;
}
.had-home-final .had-reach-map>img{width:100%!important;height:100%!important;max-height:360px!important;object-fit:contain!important;display:block!important}
.had-home-final .had-reach-metrics{
  min-height:300px!important;height:100%!important;display:grid!important;grid-template-rows:repeat(3,minmax(78px,1fr)) auto!important;
  border-left:1px solid #1b465b;padding-left:18px!important;align-content:stretch;
}
.had-home-final .had-reach-metrics>span{
  display:grid!important;grid-template-columns:32px minmax(0,1fr)!important;grid-template-rows:auto auto!important;
  align-content:center;column-gap:11px;border-bottom:1px solid #173b4e;padding:9px 0!important;
}
.had-home-final .had-reach-metrics>span>.dashicons{grid-row:1/3;font-size:23px;width:23px;height:23px;color:var(--had-cyan)}
.had-home-final .had-reach-metrics b{font-size:25px!important;line-height:1.05}
.had-home-final .had-reach-metrics small{font-size:12px!important;line-height:1.25;white-space:normal}
.had-reach-source{margin:8px 0 0!important;color:#7698a7;font:12px/1.35 ui-monospace,monospace!important}
.had-home-final .had-dashboard-zone{position:relative!important;inset:auto!important;z-index:auto!important;height:auto!important;min-height:0!important;overflow:visible!important}
.had-home-final .had-home-dashboard-grid{height:auto!important;overflow:visible!important}

/* ---------- Evidence-led Research page ---------- */
.had-research-v301 .had-project-card{min-height:0!important;padding:18px!important;text-align:left}
.had-research-v301 .had-project-card h3{min-height:0!important;font-size:18px!important;line-height:1.28;margin:10px 0 8px}
.had-research-v301 .had-project-card>p{font-size:14px!important;line-height:1.52;display:block!important;-webkit-line-clamp:unset!important;overflow:visible!important}
.had-research-v301 .had-project-role{margin:13px 0 2px;color:#b6ccd6}
.had-research-v301 .had-project-role span{font-size:13px;line-height:1.4}
.had-research-v301 .had-project-meta b{font-size:12px!important;line-height:1.35;white-space:normal}
.had-research-v301 .had-open-detail{font-size:13px!important}
.had-research-v301 .had-focus-panel,.had-research-v301 .had-methods-panel{height:auto!important;min-height:0!important}

/* ---------- Publications overview ---------- */
.had-publications-final{overflow-y:auto!important}
.had-selected-publications{margin-bottom:13px;padding:16px}
.had-selected-publications .had-section-title{align-items:flex-start}
.had-selected-publications .had-section-title h2{font-size:19px}
.had-selected-publications .had-section-title p{margin:3px 0 0;color:#7f9daa}
.had-selected-publications .had-section-title>a{display:flex;align-items:center;gap:6px;color:var(--had-cyan);text-decoration:none;font-weight:750}
.had-selected-publication-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;margin-top:13px}
.had-selected-publication-grid>button{
  min-width:0;min-height:165px;padding:13px;display:grid;grid-template-columns:24px minmax(0,1fr) 18px;align-items:start;gap:8px;
  border:1px solid #24536b;border-radius:6px;background:linear-gradient(145deg,rgba(10,41,57,.94),rgba(3,15,24,.97));text-align:left;
}
.had-selected-publication-grid>button:hover{border-color:var(--had-green);transform:translateY(-2px)}
.had-selected-publication-grid>button>span{color:var(--had-green);font:700 12px ui-monospace,monospace}
.had-selected-publication-grid>button>div{min-width:0;display:flex;flex-direction:column;gap:7px}
.had-selected-publication-grid small{color:#78a0b1;font-size:12px;line-height:1.35}
.had-selected-publication-grid b{font-size:14px;line-height:1.32}
.had-selected-publication-grid em{font-size:12px;line-height:1.42;font-style:normal;color:#819eaa;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.had-publications-v301 .had-publication-overview-card{min-height:210px}
.had-publications-v301 .had-publication-card-grid{grid-auto-rows:minmax(210px,auto)!important}
.had-publications-v301 .had-publication-year-chart{min-height:92px}
.had-publications-v301 .had-publication-overview-card h3{font-size:16px!important}

/* ---------- Featured teaching ---------- */
.had-featured-course{
  width:100%;margin-bottom:12px;padding:18px;display:grid;grid-template-columns:minmax(0,1.35fr) minmax(310px,.65fr) 22px;gap:20px;
  border-color:#28708d;background:linear-gradient(120deg,rgba(6,53,72,.94),rgba(4,20,32,.98));color:inherit;text-align:left;
}
.had-featured-course h2{font-size:25px;margin:6px 0 8px}
.had-featured-course p{font-size:15px!important;max-width:78ch;color:#afc8d3}
.had-featured-course dl{margin:0;display:grid;grid-template-columns:1fr 1fr;gap:1px;border:1px solid #24536b}
.had-featured-course dl>div{padding:10px;background:rgba(6,28,42,.85)}
.had-featured-course dt{font:700 11px ui-monospace,monospace;letter-spacing:.08em;text-transform:uppercase;color:#7899a8}
.had-featured-course dd{margin:4px 0 0;font-size:13px;line-height:1.4;color:#eaf7fa}

/* ---------- Collection information architecture ---------- */
.had-collection-screen{overflow-y:auto!important}
.had-evidence-note{
  margin:0 0 10px;padding:10px 13px;border-left:3px solid var(--had-accent);background:rgba(7,34,49,.74);color:#a8c0cb;font-size:13px!important;
}
.had-collection-body.had-collection-advanced{align-items:start!important}
.had-analytics-grid{align-content:start!important}
.had-analytics-panel{min-width:0;overflow:hidden}
.had-analytics-panel .had-analytics-title{min-height:42px}
.had-analytics-panel .had-metric-bars>div{margin-top:9px}
.had-metric-bars>div>span{min-width:0;align-items:flex-start!important;gap:8px}
.had-metric-bars>div>span b{
  max-width:calc(100% - 32px)!important;white-space:normal!important;overflow:visible!important;text-overflow:clip!important;overflow-wrap:anywhere!important;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;line-height:1.35!important;font-size:13px!important;
}
.had-metric-bars>div>span em{flex:0 0 auto;font-size:12px!important}
.had-dimension-group h3,.had-media-profile-panel>h3{font:700 11px ui-monospace,monospace;letter-spacing:.1em;color:#7397a7;margin:12px 0 7px}
.had-facet-chips span{font-size:12px!important;white-space:normal!important;line-height:1.3}
.had-year-bars,.had-advanced-year-bars{min-height:190px!important;padding-top:22px!important}
.had-year-bars>span,.had-advanced-year-bars>span{min-height:145px!important}
.had-year-bars i,.had-advanced-year-bars i{min-height:22px;min-width:24px}
.had-year-bars em,.had-year-bars small,.had-advanced-year-bars em,.had-advanced-year-bars small{font-size:12px!important}

/* Conference map and profile: map 60%, profile 40%, dimensions above bars. */
[data-had-collection-type="conferences"] .had-analytics-grid{grid-template-columns:minmax(0,3fr) minmax(340px,2fr)!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:465px}
[data-had-collection-type="conferences"] .had-analytics-grid>.had-analytics-panel:nth-child(2){grid-column:2!important;grid-row:1!important;min-height:220px}
[data-had-collection-type="conferences"] .had-analytics-grid>.had-conference-profile-panel{grid-column:2!important;grid-row:2!important;min-height:235px}
[data-had-collection-type="conferences"] .had-record-world-map{min-height:360px!important}
.had-conference-profile-dimensions{display:block!important;position:relative!important;z-index:2;background:#061925;padding-bottom:8px;border-bottom:1px solid #1c475b}
.had-conference-year-chart{position:relative!important;z-index:1;padding-top:9px!important;min-height:145px}
.had-conference-year-label{display:block;margin-bottom:2px;color:#789aaa;font-size:11px!important}
.had-conference-year-chart .had-year-bars,.had-conference-year-chart .had-advanced-year-bars{min-height:130px!important;padding-top:15px!important}

/* Small scholarly collections: summary + year evidence, not four competing panels. */
[data-had-collection-type="book"] .had-analytics-grid,
[data-had-collection-type="theses"] .had-analytics-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
[data-had-collection-type="book"] .had-book-year-panel,
[data-had-collection-type="theses"] .had-thesis-year-panel{grid-column:1/-1!important;min-height:250px}
[data-had-collection-type="book"] .had-book-summary-panel,
[data-had-collection-type="theses"] .had-thesis-profile-panel{min-height:280px}

/* Journal page: selected strip and expandable abstracts. */
.had-journal-feature-strip{margin:0 0 11px;padding:14px;border:1px solid #1f5065;border-radius:6px;background:rgba(5,27,41,.87)}
.had-journal-feature-strip>.had-section-title{margin-bottom:10px}
.had-journal-feature-strip>div:last-child{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.had-journal-feature-strip button{min-height:100px;padding:11px;display:grid;grid-template-columns:minmax(0,1fr) 18px;gap:7px;border:1px solid #204d61;background:#061925;text-align:left}
.had-journal-feature-strip button small{grid-column:1/-1;color:#78a0b0;font-size:12px}
.had-journal-feature-strip button b{font-size:13px;line-height:1.35}
.had-collection-record-item{position:relative;border-bottom:1px solid #173d50}
.had-collection-record-item>.had-record-row{border-bottom:0!important}
.had-record-abstract{margin:-2px 18px 9px 89px;border-left:2px solid #28627a;padding:0 0 0 10px;color:#90abb7}
.had-record-abstract summary{cursor:pointer;color:#83d9e8;font-size:12px;font-weight:750;padding:5px 0}
.had-record-abstract p{max-width:80ch;margin:2px 0 8px;font-size:13px!important}
.had-record-evidence{display:flex!important;flex-wrap:wrap;gap:5px;margin-top:5px}
.had-record-evidence i{padding:2px 6px;border:1px solid #2b6175;border-radius:999px;color:#8fd4e1;font:700 10px ui-monospace,monospace;font-style:normal}
.had-record-translation{display:block;color:#9db7c2;font-size:12px!important;line-height:1.35;margin:3px 0}

/* Media and visits become narrative-first. */
.had-media-story-grid,.had-visit-story-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin-top:10px}
.had-visit-story-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.had-media-story-grid>button,.had-visit-story-grid>button{
  min-width:0;min-height:190px;padding:14px;display:flex;flex-direction:column;align-items:flex-start;gap:7px;
  border:1px solid #26566b;border-radius:6px;background:linear-gradient(145deg,rgba(9,40,56,.95),rgba(3,16,25,.98));text-align:left;color:inherit;
}
.had-media-story-grid>button:hover,.had-visit-story-grid>button:hover{border-color:var(--had-accent);transform:translateY(-2px)}
.had-media-story-grid small,.had-visit-story-grid small{color:var(--had-accent);font:700 11px ui-monospace,monospace}
.had-media-story-grid b,.had-visit-story-grid b{font-size:15px;line-height:1.35}
.had-media-story-grid em{font-size:13px;font-style:normal;color:#9eb9c4}
.had-media-story-grid p,.had-visit-story-grid p{font-size:13px!important;color:#819eaa}
.had-media-story-grid>button>span,.had-visit-story-grid>button>span{margin-top:auto;padding-top:7px;color:#83d7e6;font-size:12px}
.had-media-profile-panel{min-height:265px}
.had-media-profile-panel [data-had-media-analytics-body="years"]{margin-top:11px}
.had-visit-summary{margin-top:12px}
.had-record-source-link{position:absolute;right:38px;bottom:9px;z-index:2;color:var(--had-cyan);font-size:12px;text-decoration:none}
[data-had-collection-type="media"] .had-collection-records .had-scroll-list,
[data-had-collection-type="research-visits"] .had-collection-records .had-scroll-list{display:grid;grid-template-columns:1fr;gap:7px;padding:7px}
[data-had-collection-type="media"] .had-collection-record-item,
[data-had-collection-type="research-visits"] .had-collection-record-item{border:1px solid #214f64;border-radius:5px;background:#061925}

/* Funding integrity. */
[data-had-collection-type="scholarships"] .had-funding-total em{display:block;color:#b9a0ff;font-size:13px;margin-top:5px}
[data-had-collection-type="scholarships"] .had-metric-bars>div>span b{font-size:13px!important}

/* Editorial interpretation. */
.had-editorial-explanation{margin:0 0 11px;color:#96b2be;font-size:13px!important;max-width:90ch}
.had-editorial-year{display:grid!important;grid-template-columns:145px minmax(0,1fr)!important;gap:12px;align-items:end}
.had-editorial-year .had-year-bars,.had-editorial-year .had-advanced-year-bars{min-height:170px!important}

/* Pedagogical programme consolidation. */
.had-pedagogy-record-group{margin:8px;border:1px solid #276171;border-radius:6px;background:rgba(5,31,42,.8);overflow:hidden}
.had-pedagogy-record-group>summary{min-height:68px;padding:12px 14px;display:flex;align-items:center;justify-content:space-between;gap:14px;cursor:pointer;background:rgba(12,65,74,.32);list-style:none}
.had-pedagogy-record-group>summary::-webkit-details-marker{display:none}
.had-pedagogy-record-group>summary span{display:flex;flex-direction:column;gap:3px}
.had-pedagogy-record-group>summary b{font-size:15px}
.had-pedagogy-record-group>summary small{font-size:12px;color:#91acb7}
.had-pedagogy-record-group>summary em{font:700 12px ui-monospace,monospace;font-style:normal;color:var(--had-green);text-align:right}
.had-pedagogy-record-group>div{padding:0 7px 7px}
.had-other-pedagogy{margin:10px 8px}
.had-subsection-title{display:flex;align-items:center;justify-content:space-between;padding:9px 4px;border-bottom:1px solid #245267}
.had-subsection-title h3{font-size:15px;margin:0}
.had-subsection-title span{min-width:25px;height:25px;display:grid;place-items:center;border:1px solid #2f6679;border-radius:999px;color:var(--had-green)}

/* Contact: functional server-side form and adaptive image. */
.had-contact-final .had-contact-layout{align-items:start}
.had-contact-final .had-contact-card,.had-contact-final .had-contact-form{height:auto!important;min-height:0!important}
.had-contact-final .had-contact-portrait{height:min(520px,62vh)!important;min-height:390px}
.had-contact-final .had-contact-portrait img{width:100%;height:100%;object-fit:cover}
.had-native-contact-form .had-section-title{margin-bottom:13px}
.had-native-contact-form .had-section-title p{margin:4px 0 0;color:#84a3b4}
.had-contact-alert{margin:0 0 12px;padding:10px 12px;border-left:3px solid var(--had-cyan);background:#072738;color:#dff9ff;font-size:13px}
.had-contact-alert.is-error{border-color:#ff7a8a;background:#30141b}
.had-honeypot{position:absolute!important;left:-9999px!important;width:1px!important;height:1px!important;overflow:hidden!important}
.had-contact-submit{display:flex;align-items:center;gap:13px;flex-wrap:wrap}
.had-contact-submit button{min-height:46px;padding:0 16px;display:flex;align-items:center;gap:8px;border:1px solid var(--had-cyan);background:var(--had-cyan);color:#00131d;font-weight:800}
.had-contact-submit button:disabled{opacity:.65;cursor:wait}
.had-contact-submit>a{color:#8fcbd8;text-decoration:none}

/* Credentials should size to their actual evidence. */
.had-credentials-v3 .had-credential-layout{align-items:start}
.had-credentials-v3 .had-credential-detail{height:auto!important;min-height:420px!important;max-height:none!important;align-self:start}
.had-credentials-v3 .had-credential-detail h2{font-size:clamp(30px,3vw,49px)!important}

/* Career timeline: readable overlapping roles. */
.had-experience-layout .had-timeline-row{min-height:94px!important;height:auto!important;align-items:flex-start;padding-top:14px;padding-bottom:14px}
.had-experience-layout .had-timeline-row h3{font-size:16px;line-height:1.3}
.had-experience-layout .had-timeline-row p{font-size:14px!important}

/* Blog reading and comments. */
.had-blog-reader-content,.had-single-post-body,.had-rich-content{line-height:1.65}
.had-detail-drawer.is-blog-reader .had-record-copy{max-width:76ch}
.had-detail-drawer.is-blog-reader .had-rich-content :where(p,li){font-size:16px!important;line-height:1.68}
.had-detail-drawer.is-blog-reader .had-rich-content img{max-width:100%;height:auto}
.had-blog-comments,.comment-respond{max-width:76ch;margin-inline:auto}

/* ---------- Responsive and zoom resilience ---------- */
@media(max-width:1450px){
  .had-home-final .had-home-top{grid-template-columns:minmax(420px,1.18fr) minmax(330px,.92fr) minmax(285px,.72fr)!important}
  .had-home-primary-links{grid-template-columns:1fr}
  .had-home-primary-links a{min-height:38px}
  .had-selected-publication-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .had-selected-publication-grid>button:nth-child(n+4){min-height:130px}
}
@media(max-width:1180px){
  .had-home-final .had-home-top{grid-template-columns:1fr 1fr!important}
  .had-home-final .had-impact-stack{grid-column:1/-1;min-height:340px!important}
  .had-home-final .had-impact-stack .had-scholar-card{min-height:340px!important}
  .had-home-final .had-home-reach .had-reach-card{grid-template-columns:minmax(0,2.3fr) minmax(230px,1fr)!important}
  .had-selected-publication-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  [data-had-collection-type="conferences"] .had-analytics-grid{grid-template-columns:1fr!important}
  [data-had-collection-type="conferences"] .had-analytics-grid>*{grid-column:auto!important;grid-row:auto!important}
  [data-had-collection-type="conferences"] .had-analytics-grid>.had-analytics-wide:first-child{min-height:390px}
  .had-media-story-grid{grid-template-columns:1fr 1fr}
  .had-featured-course{grid-template-columns:1fr}
}
@media(max-width:900px){
  body.had-theme{font-size:15px!important;overflow:auto!important}
  .had-app-shell{height:auto!important;min-height:100dvh!important;overflow:visible!important}
  .had-shell-body{height:auto!important;min-height:calc(100dvh - var(--had-topbar));display:block!important}
  .had-workspace{overflow:visible!important;min-height:100dvh}
  .had-top-stream{display:flex!important}
  .had-top-stream{position:absolute;left:68px;right:250px}
  .had-home-final .had-home-top{display:grid!important;grid-template-columns:1fr!important}
  .had-home-final .had-profile-card,.had-home-final .had-news-console,.had-home-final .had-impact-stack,.had-home-final .had-impact-stack .had-scholar-card{min-height:0!important}
  .had-home-final .had-profile-card{grid-template-columns:minmax(150px,35%) 1fr!important}
  .had-home-final .had-home-reach .had-reach-card{grid-template-columns:1fr!important;grid-template-rows:auto minmax(270px,340px) auto!important}
  .had-home-final .had-reach-metrics{grid-template-columns:repeat(3,1fr)!important;grid-template-rows:auto auto!important;min-height:0!important;border-left:0;border-top:1px solid #1b465b;padding:12px 0 0!important}
  .had-home-final .had-reach-metrics>span{border-bottom:0;border-right:1px solid #173b4e;padding:8px 12px!important}
  .had-home-final .had-reach-metrics>span:nth-child(3){border-right:0}
  .had-reach-source{grid-column:1/-1;padding:4px 12px}
  .had-selected-publication-grid,.had-journal-feature-strip>div:last-child,.had-media-story-grid,.had-visit-story-grid{grid-template-columns:1fr}
  [data-had-collection-type="book"] .had-analytics-grid,[data-had-collection-type="theses"] .had-analytics-grid{grid-template-columns:1fr!important}
  .had-record-abstract{margin-left:20px}
}
@media(max-width:620px){
  .had-top-stream{display:none!important}
  .had-home-final .had-profile-card{display:block!important}
  .had-home-final .had-portrait{min-height:360px}
  .had-home-primary-links{grid-template-columns:1fr}
  .had-home-final .had-reach-map{min-height:230px!important}
  .had-home-final .had-home-reach .had-reach-card{grid-template-rows:auto 240px auto!important;padding:11px!important}
  .had-home-final .had-reach-metrics{grid-template-columns:1fr!important}
  .had-home-final .had-reach-metrics>span{border-right:0;border-bottom:1px solid #173b4e}
  .had-selected-publication-grid{grid-template-columns:1fr}
  .had-featured-course dl{grid-template-columns:1fr}
  .had-pedagogy-record-group>summary{align-items:flex-start;flex-direction:column}
  .had-pedagogy-record-group>summary em{text-align:left}
}

@media(prefers-reduced-motion:reduce){
  .had-top-stream>div>span,.had-reach-dot>i,.had-map-scan,.had-news-scan{animation:none!important}
}

/* Code portfolio provenance and maintenance metadata. */
.had-code-sync-status{display:block;margin-top:5px;color:#86a7b5;font-size:12px;line-height:1.4}
.had-code-project .had-code-evidence{display:block;margin-top:8px;color:#7fa8b7;font:600 12px/1.45 ui-monospace,monospace;font-style:normal;white-space:normal}
.had-code-project>span:nth-child(2){min-width:0}
.had-code-project>span:nth-child(2)>b,.had-code-project>span:nth-child(2)>p{overflow-wrap:anywhere}
