/*
 * TOA V2.1 — HOMEPAGE MODEL B, "لوحة الأثر" (v5).
 *
 * Owner decision, 14 October 2026 (docs/45-home-model-b.md). Loaded on the
 * homepage only, after site.css, and every rule is scoped under `.hb` so no
 * other page can be touched by it.
 *
 * LIGHT MODE ONLY, like the rest of the site. Green is the primary; gold is
 * DECORATION ONLY (rules, dots, chips, the active outline) — the official gold
 * measures 2.49:1 on the light canvas, so gold-coloured TEXT uses the
 * accessible --gold-text from site.css, or sits on green (4.81:1).
 *
 * CSP: this file is the only place the homepage's presentation lives. There is
 * no style attribute in the markup; the few data-driven values (the years
 * strip widths, the pointer light) are set through the CSSOM by home.js.
 *
 * Motion is decoration: everything that moves stops under
 * prefers-reduced-motion (bottom of this file), and nothing depends on it.
 */

.hb {
  --hb-green-2: #14523F;
  --hb-green-deep: #053321;
  --hb-green-line: #CFDDD5;
  --hb-on-green: #D8E3DD;
  --hb-ivory: #FCF9F2;
  --hb-gold-line: #EBDDB8;
  --hb-ease: cubic-bezier(.2, .7, .2, 1);
}

/* 16px side gutters on a phone, the site's 1140px column on a wide screen. */
.hb-wrap {
  width: min(100% - 2 * max(16px, env(safe-area-inset-left, 0px)), var(--wrap));
  margin-inline: auto;
}

.hb p { margin: 0; }
.hb h3, .hb h4 { margin: 0; }

/* ---------- shared section chrome ---------- */
.hb-sec { padding-block: 64px; }
.hb-sec-alt { background: var(--hb-ivory); border-block: 1px solid var(--border); }

.hb-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .84rem; font-weight: 700; color: var(--gold-text);
}
.hb-eyebrow::before {
  content: ""; width: 26px; height: 2px; border-radius: 2px; background: var(--gold); flex: none;
}

/* The section-heading size. The owner's name uses the SAME scale (owner
   decision: the name at section-heading size, not a giant hero). */
.hb-h2,
.hb-name {
  font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.125rem);
  font-weight: 800; line-height: 1.4;
}
html[dir="rtl"] .hb-h2,
html[dir="rtl"] .hb-name { line-height: 1.9; }
.hb-h2 { color: var(--green); margin: 4px 0 0; }

/* ---------- 1. who I am: the board ---------- */
.hb-board { padding-block: 24px 0; }

.hb-bento {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px;
}

.hb-tile {
  position: relative; min-width: 0; overflow: hidden;
  display: grid; align-content: start; gap: 8px;
  padding: 22px; border-radius: 18px;
  background: var(--surface); border: 1px solid var(--border);
}
/* Pointer light: a soft gold glow that follows the cursor (home.js sets
   --mx/--my through the CSSOM). Decorative only. */
.hb-tile::after,
.hb-area::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), rgba(199, 154, 46, .13), transparent 60%);
}

/* Hero tile */
.hb-hero {
  grid-column: span 4; grid-row: span 2; min-height: 340px;
  align-content: end; padding: 30px;
  background: var(--green); color: #FFF; border: 0;
}
.hb-hero::after {
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(199, 154, 46, .22), transparent 60%);
}
.hb-hero-mark {
  position: absolute; inset-block-start: 22px; inset-inline-end: 22px;
  display: inline-flex; padding: 8px 10px; border-radius: 12px; background: var(--hb-ivory);
}
.hb-hero-mark img { display: block; width: 64px; height: auto; }
.hb-eyebrow-on-green { color: var(--hb-on-green); }
.hb-badge {
  justify-self: start; display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 12px; border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, .1); color: #FFF; font-size: .84rem; font-weight: 700;
}
.hb-badge .icon { color: var(--gold); }
.hb-name { color: #FFF; margin: 0; }
html[lang|="en"] .hb-name,
html[lang|="en"] .hb-card-name { text-transform: uppercase; letter-spacing: .03em; }
.hb-role { color: var(--gold); font-weight: 700; font-size: 1.1rem; }
.hb-phrase { color: #FFF; font-weight: 700; max-width: 56ch; }
.hb-intro { color: var(--hb-on-green); max-width: 62ch; font-size: 1rem; }
.hb-ctas { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }

.hb-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  padding: 8px 18px; border-radius: 10px; border: 1px solid transparent;
  font-weight: 700; font-size: .95rem; text-decoration: none;
}
.hb-btn-light { background: #FFF; color: var(--green); }
.hb-btn-light:hover { background: var(--hb-ivory); color: var(--green); }
.hb-btn-ghost { border-color: rgba(255, 255, 255, .45); color: #FFF; }
.hb-btn-ghost:hover { border-color: #FFF; color: #FFF; background: rgba(255, 255, 255, .08); }
.hb-hero :focus-visible { outline-color: var(--gold); }

/* Card tile */
.hb-cardtile {
  grid-column: span 2; padding: 14px; overflow: visible;
  background: var(--hb-ivory); place-items: center; align-content: center; gap: 10px;
}
.hb-cardtile::after { display: none; }

.hb-card { width: 100%; display: grid; gap: 10px; }
.hb-face { border-radius: 18px; overflow: hidden; }
.hb-front {
  position: relative; display: grid; align-content: space-between; gap: 10px;
  padding: 20px 22px; color: #FFF; text-align: start;
  background: linear-gradient(135deg, var(--hb-green-2), var(--green) 45%, var(--hb-green-deep));
  box-shadow: 0 30px 60px -30px rgba(5, 51, 33, .55);
}
.hb-front-top { display: flex; justify-content: space-between; align-items: start; }
.hb-front-mark { display: inline-flex; padding: 5px 7px; border-radius: 8px; background: var(--hb-ivory); }
.hb-front-mark img { display: block; width: 48px; height: auto; }
.hb-chip { width: 38px; height: 28px; border-radius: 6px; background: linear-gradient(135deg, #E3C27A, var(--gold)); opacity: .9; }
.hb-card-name { font-size: 1.15rem; font-weight: 800; line-height: 1.4; }
.hb-card-role { font-size: .84rem; font-weight: 700; color: var(--gold); line-height: 1.5; }
.hb-card-org { font-size: .8rem; color: var(--hb-on-green); line-height: 1.5; }
.hb-card-social { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.hb-card-social a {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px;
  color: #FFF; background: rgba(255, 255, 255, .08);
}
.hb-card-social a:hover { background: rgba(255, 255, 255, .18); color: #FFF; }
.hb-card-social a:focus-visible { outline-color: var(--gold); }
.hb-shine { position: absolute; inset: 0; pointer-events: none; display: none; border-radius: inherit; }

.hb-back {
  display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center;
  padding: 18px; text-align: start; background: var(--surface); border: 1px solid var(--border);
}
.hb-qr { width: 108px; height: 108px; border-radius: 6px; }
.hb-back-text { display: grid; gap: 4px; }
.hb-back-title { color: var(--green); font-weight: 800; }
.hb-back-note { color: var(--muted); font-size: .8rem; line-height: 1.6; }
.hb-back-link { justify-self: start; display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: .88rem; }

.hb-flip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px;
  padding: 4px 12px; border: 0; border-radius: var(--radius-pill);
  background: transparent; color: var(--muted); font: inherit; font-size: .84rem; cursor: pointer;
}
.hb-flip:hover { color: var(--green); background: var(--green-soft); }
.hb-flip[hidden] { display: none; }

/* With the script: a real two-sided card. Without it the two faces simply
   stack, both readable, and nothing is lost. */
.hb.is-ready .hb-cardtile { perspective: 1100px; }
/* Both faces share one grid cell, so the card is as tall as its taller face:
   a long title wraps instead of being clipped. */
.hb.is-ready .hb-card {
  position: relative; display: grid; gap: 0; width: 100%;
  grid-template-columns: minmax(0, 1fr);
  transform-style: preserve-3d; transition: transform .7s var(--hb-ease); cursor: pointer;
}
.hb.is-ready .hb-face {
  grid-area: 1 / 1; aspect-ratio: 1.75;
  /* Visible, not hidden: an aspect ratio only yields to taller content when
     the box does not clip. The rounded corners are kept by the shine's own
     radius and by the faces' backgrounds. */
  overflow: visible;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
}
.hb.is-ready .hb-back { transform: rotateY(180deg); }
.hb.is-ready .hb-card.is-flipped { transform: rotateY(180deg); }
.hb.is-ready .hb-shine {
  display: block;
  background: radial-gradient(500px circle at var(--sx, 30%) var(--sy, 20%), rgba(255, 255, 255, .18), transparent 45%);
}

/* Indicator tiles */
.hb-stat { grid-column: span 2; align-content: center; }
.hb-stat-value { font-size: 1.15rem; font-weight: 800; color: var(--green); line-height: 1.5; }
.hb-stat-label { color: var(--muted); font-size: .92rem; }
.hb-stat-lead { background: var(--gold-soft); border-color: var(--hb-gold-line); }
.hb-stat-lead .hb-stat-value { font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem); line-height: 1.4; }
.hb-stat-lead .hb-stat-label { color: var(--gold-text); font-weight: 700; }

.hb-k { font-size: .8rem; font-weight: 800; color: var(--gold-text); }

/* Philosophy */
.hb-quote { grid-column: span 3; background: var(--hb-ivory); }
.hb-quote-body { margin: 0; }
.hb-quote-body p { font-size: 1.1rem; font-weight: 700; color: var(--green); line-height: 1.8; }
.hb-quote-body p::before {
  content: "\201C"; color: var(--gold); font-size: 2.4rem; line-height: 0;
  vertical-align: -.35em; margin-inline-end: 4px;
}
html[dir="rtl"] .hb-quote-body p::before { content: "\201D"; }

/* Values */
.hb-values { grid-column: span 3; }
.hb-value-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.hb-value-title { font-weight: 700; color: var(--green); }
.hb-value-desc { display: block; color: var(--muted); font-size: .92rem; }
.hb.is-ready .hb-value-list { display: flex; flex-wrap: wrap; }
.hb.is-ready .hb-value-title {
  display: inline-block; padding: 3px 14px; border-radius: var(--radius-pill);
  border: 1px solid var(--hb-green-line); background: var(--green-soft);
  font-size: .9rem; cursor: default;
}
.hb.is-ready .hb-value-title:hover,
.hb.is-ready .hb-value-title:focus-visible,
.hb.is-ready .hb-value.is-on .hb-value-title { background: var(--green); color: #FFF; }
.hb.is-ready .hb-value-desc {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}
.hb-value-hint { color: var(--muted); font-size: .92rem; min-height: 1.8em; }

/* ---------- 2. career ---------- */
.hb-years {
  list-style: none; margin: 22px 0 0; padding: 0;
  display: flex; height: 44px; border-radius: 10px; overflow: hidden;
  border: 1px solid var(--border); background: var(--surface);
}
.hb-seg { flex: 1 1 0; min-width: 0; }
.hb-seg + .hb-seg { border-inline-start: 2px solid var(--bg); }
.hb-seg a {
  display: flex; align-items: center; justify-content: center; height: 100%; padding-inline: 6px;
  background: var(--green-soft); color: var(--green); text-decoration: none;
  font-size: .8rem; font-weight: 800; white-space: nowrap;
}
.hb-seg-org { overflow: hidden; text-overflow: ellipsis; }
.hb-seg a:hover { background: #E2EBE5; color: var(--green); }
.hb-seg.is-on a { background: var(--green); color: #FFF; }
.hb-seg a:focus-visible { outline-offset: -3px; border-radius: 8px; }

.hb-axis {
  list-style: none; margin: 4px 0 0; padding: 0; display: flex;
  font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums;
}
.hb-axis-cell { position: relative; flex: 1 1 0; min-width: 0; height: 22px; }
.hb-axis-start { position: absolute; inset-inline-end: 0; }
.hb-axis-now { position: absolute; inset-inline-start: 0; }
/* The start year sits ON the boundary with the next (older) segment. */
html[dir="ltr"] .hb-axis-cell:not(:last-child) .hb-axis-start { transform: translateX(50%); }
html[dir="rtl"] .hb-axis-cell:not(:last-child) .hb-axis-start { transform: translateX(-50%); }

.hb-jobs { display: grid; gap: 12px; margin-top: 22px; }
.hb-job {
  display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 4px 24px;
  padding: 18px 20px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--border);
  scroll-margin-block-start: calc(var(--header-h) + 24px);
}
.hb-job.is-on { border-color: var(--gold); box-shadow: 0 12px 30px -22px rgba(13, 59, 46, .45); }
.hb-per {
  display: grid; align-content: start; gap: 2px;
  padding-inline-end: 16px; border-inline-end: 1px solid var(--border);
}
.hb-per-years { font-size: 1.05rem; font-weight: 700; color: var(--green); font-variant-numeric: tabular-nums; }
.hb-per-when { font-size: .82rem; color: var(--muted); }
.hb-dur {
  justify-self: start; margin-top: 6px !important; padding: 0 10px; border-radius: var(--radius-pill);
  background: var(--gold-soft); color: var(--gold-text); font-weight: 800; font-size: .78rem;
}
.hb-org { font-size: 1.25rem; font-weight: 800; color: var(--green); line-height: 1.5; }
html[dir="rtl"] .hb-org { line-height: 1.9; }
.hb-now { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 800; color: var(--green); }
.hb-now-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); }
.hb-roles { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 14px; }
.hb-role-title { font-size: 1.03rem; font-weight: 800; color: var(--text); line-height: 1.6; }
html[dir="rtl"] .hb-role-title { line-height: 1.9; }
.hb-role-when { font-size: .82rem; font-weight: 700; color: var(--gold-text); }
.hb-role-text { font-size: .95rem; margin-top: 6px !important; max-width: var(--measure); }
.hb-role-bullets { margin: 6px 0 0; padding-inline-start: 20px; font-size: .95rem; }
.hb-roles-multi { position: relative; padding-inline-start: 20px; }
.hb-roles-multi::before {
  content: ""; position: absolute; inset-inline-start: 5px; inset-block: 8px; width: 2px; background: var(--green-soft);
}
.hb-roles-multi .hb-role-item { position: relative; }
.hb-roles-multi .hb-role-item::before {
  content: ""; position: absolute; inset-inline-start: -20px; top: 8px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--surface); border: 3px solid var(--hb-green-line);
}
.hb-roles-multi .hb-role-item:first-child::before { border-color: var(--gold); }

/* ---------- 3. domains ---------- */
.hb-areas {
  list-style: none; margin: 22px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 12px;
}
.hb-area {
  position: relative; overflow: hidden; display: grid; align-content: start; gap: 6px;
  padding: 18px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border);
}
.hb-area-n { font-size: .8rem; font-weight: 800; color: var(--gold-text); font-variant-numeric: tabular-nums; }
.hb-area-title { font-size: 1.03rem; font-weight: 800; color: var(--green); line-height: 1.6; }
html[dir="rtl"] .hb-area-title { line-height: 1.9; }
.hb-area-text { font-size: .92rem; color: var(--muted); }

/* ---------- 4. achievements ---------- */
.hb-achs {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 16px; margin-top: 24px;
}
.hb-ach {
  display: grid; align-content: start; gap: 12px; padding: 20px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--border);
}
.hb-ach-title { font-size: 1.1rem; font-weight: 800; color: var(--green); line-height: 1.6; }
html[dir="rtl"] .hb-ach-title { line-height: 1.9; }
.hb-pane { display: grid; gap: 2px; }
.hb-pane-k { font-size: .8rem; font-weight: 800; color: var(--gold-text); }
.hb-pane-text { font-size: .97rem; }
.hb-pane[hidden] { display: none; }
.hb-ach-more { font-size: .95rem; color: var(--muted); }
.hb-tabs { display: flex; gap: 3px; padding: 3px; border-radius: 10px; background: var(--green-soft); }
.hb-tabs[hidden] { display: none; }
.hb-tabs button {
  flex: 1; min-height: 36px; border: 0; border-radius: 8px; background: none; cursor: pointer;
  font: inherit; font-size: .9rem; font-weight: 700; color: var(--green);
}
.hb-tabs button[aria-selected="true"] { background: var(--surface); box-shadow: 0 1px 3px rgba(13, 59, 46, .15); }
.hb-tabs button:focus-visible { outline-offset: -2px; }
.hb.is-ready .hb-ach[data-hb-steps] .hb-pane { min-height: 96px; align-content: start; }
.hb.is-ready .hb-ach[data-hb-steps] .hb-pane-k {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}
.hb-dots { display: none; gap: 6px; }
.hb.is-ready .hb-dots { display: flex; }
.hb-dots i { flex: 1; height: 4px; border-radius: 4px; background: var(--green-soft); }
.hb-dots i.is-on { background: var(--gold); }
.hb-ach-digest { font-size: .97rem; padding-inline-start: 10px; border-inline-start: 3px solid var(--gold); }

/* ---------- 5. projects ---------- */
.hb-projects {
  list-style: none; margin: 22px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 16px;
}
/* One project at launch: it should read as a feature, not a lonely column. */
.hb-projects:has(> .hb-project:only-child) { grid-template-columns: minmax(0, 720px); }
.hb-project {
  display: grid; grid-template-rows: auto 1fr; overflow: hidden; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--border);
}
.hb-project-cover {
  position: relative; display: grid; place-items: center; aspect-ratio: 16 / 7; overflow: hidden;
  background: linear-gradient(135deg, var(--hb-green-2), var(--hb-green-deep)); color: var(--gold);
}
.hb-project-cover::before {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .04) 0 2px, transparent 2px 14px);
}
.hb-project-cover .icon { position: relative; }
.hb-project-body { display: grid; align-content: start; gap: 8px; padding: 16px 18px 20px; }
.hb-project-title { font-size: 1.1rem; font-weight: 800; color: var(--green); line-height: 1.6; }
html[dir="rtl"] .hb-project-title { line-height: 1.9; }
.hb-project-text { font-size: .95rem; color: var(--muted); }
.hb-project-go {
  justify-self: start; display: inline-flex; align-items: center; gap: 6px; min-height: 44px;
  font-weight: 800; font-size: .92rem; color: var(--green); text-decoration: none;
}
.hb-project-go:hover { text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 2px; }

/* ---------- 6. contact ---------- */
.hb-contact { display: grid; gap: 14px; justify-items: start; }
.hb-contact-intro { color: var(--muted); max-width: 64ch; }
.hb-contact-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.hb-btn-solid { background: var(--green); color: #FFF; }
.hb-btn-solid:hover { background: var(--green-hover); color: #FFF; }
.hb-btn-line { background: var(--surface); color: var(--green); border-color: var(--hb-green-line); }
.hb-btn-line:hover { border-color: var(--green); color: var(--green); }
/* Official platform glyphs, ONE brand colour (owner-approved exception to
   Lucide-only — the same first-party glyphs the footer and card use). */
.hb-social { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.hb-social a {
  position: relative; display: grid; place-items: center; width: 50px; height: 50px;
  border-radius: 14px; background: var(--surface); border: 1px solid var(--border); color: var(--green);
}
.hb-social a::after {
  content: ""; position: absolute; inset-inline: 14px; bottom: 7px; height: 2px; border-radius: 2px;
  background: var(--gold); transform: scaleX(0);
}
.hb-social a:hover,
.hb-social a:focus-visible { background: var(--green); border-color: var(--green); color: #FFF; }
.hb-social a:hover::after,
.hb-social a:focus-visible::after { transform: scaleX(1); }

/* ---------- motion (only when the visitor allows it) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hb-tile, .hb-area, .hb-project { transition: transform .35s var(--hb-ease), box-shadow .35s, border-color .3s; }
  .hb-tile::after, .hb-area::after { transition: opacity .3s; }
  .hb-btn { transition: transform .2s var(--hb-ease), background-color .2s, border-color .2s; }
  .hb-seg a, .hb-value-title, .hb-tabs button { transition: background-color .25s, color .25s; }
  .hb-job { transition: border-color .3s, box-shadow .3s; }
  .hb-social a { transition: background-color .25s, color .25s, border-color .25s, transform .25s var(--hb-ease); }
  .hb-social a::after { transition: transform .25s var(--hb-ease); }
  .hb-pane:not([hidden]) { animation: hb-fade .35s var(--hb-ease); }

  @media (hover: hover) {
    .hb-tile:not(.hb-cardtile):hover,
    .hb-area:hover { transform: translateY(-3px); box-shadow: 0 16px 36px -22px rgba(13, 59, 46, .4); }
    .hb-tile:hover::after, .hb-area:hover::after { opacity: 1; }
    .hb-btn:hover { transform: translateY(-2px); }
    .hb-project:hover { transform: translateY(-4px); box-shadow: 0 18px 36px -24px rgba(13, 59, 46, .5); border-color: var(--hb-green-line); }
  }
}
@keyframes hb-fade { from { opacity: 0; transform: translateY(6px); } }

@media (prefers-reduced-motion: reduce) {
  .hb *, .hb *::before, .hb *::after { animation: none !important; transition: none !important; }
  .hb.is-ready .hb-card { transition: none; }
}

/* ---------- narrower screens ---------- */
@media (max-width: 860px) {
  .hb-bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hb-hero, .hb-cardtile, .hb-quote, .hb-values { grid-column: span 2; }
  .hb-hero { grid-row: auto; min-height: 0; padding: 24px; }
  .hb-stat { grid-column: span 1; }
  .hb-cardtile { justify-items: stretch; }
  .hb.is-ready .hb-card { max-width: 420px; justify-self: center; width: 100%; }
}
@media (max-width: 640px) {
  .hb-sec { padding-block: 48px; }
  .hb-job { grid-template-columns: minmax(0, 1fr); padding: 16px; }
  .hb-per {
    display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px;
    padding: 0; border: 0;
  }
  .hb-dur { margin-top: 0 !important; }
  /* Narrow segments: years sit inside their own cell instead of straddling
     the boundary, so neighbouring labels cannot overlap. */
  html[dir] .hb-axis-cell:not(:last-child) .hb-axis-start { transform: none; }
  .hb-hero-mark { inset-block-start: 16px; inset-inline-end: 16px; }
  .hb-hero-mark img { width: 52px; }
  .hb-hero { padding-block-start: 84px; }
}
@media (max-width: 380px) {
  .hb-stat { grid-column: span 2; }
}
