/* nazirulhazim.com: domain portfolios, domain CVs and the Domains section of the main page.
   Each page sets --accent and --tint on <body> from data/domains.json. */

/* ── Domains section on the main page ─────────────────── */
.dhub-intro { max-width: 760px; color: var(--ink-2, #4a4a4a); margin: 0 0 22px; font-size: 16px; line-height: 1.55; }
.dcards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-bottom: 40px; }
.dcard { background: var(--t); border-top: 6px solid var(--c); display: flex; flex-direction: column; min-width: 0; }
.dcard-img { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #ddd; }
.dcard-img img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; display: block; transition: transform .3s; }
.dcard:hover .dcard-img img { transform: scale(1.03); }
.dcard-body { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.dcard-tag { font: 600 11px/1.3 Arial, Helvetica, sans-serif; letter-spacing: .06em; text-transform: uppercase; color: var(--c); margin-bottom: 6px; }
.dcard-h { font: 700 20px/1.15 'Arial Narrow', 'Roboto Condensed', Arial, sans-serif; margin: 0 0 8px; }
.dcard-h a { color: #000; text-decoration: none; }
.dcard-h a:hover { color: var(--c); }
.dcard-sub { font: 14px/1.45 Arial, Helvetica, sans-serif; color: #4a4a4a; margin: 0 0 12px; flex: 1; }
.dcard-links { display: flex; gap: 8px; }
.dcard-links a { font: 700 13px Arial, sans-serif; color: #fff; background: var(--c); padding: 7px 12px; text-decoration: none; border-radius: 0; }
.dcard-links a + a { background: transparent; color: var(--c); box-shadow: inset 0 0 0 1.5px var(--c); }

.dm-wrap { overflow-x: auto; max-width: 100%; position: relative; padding-bottom: 4px; }
.dm { border-collapse: separate; border-spacing: 3px; font: 14px Arial, Helvetica, sans-serif; }
.dm-cap { caption-side: top; text-align: left; font-size: 13.5px; color: #555; padding: 0 0 10px; }
.dm th, .dm td { padding: 0; text-align: center; width: 70px; height: 46px; }
.dm thead th { vertical-align: bottom; border-bottom: 4px solid var(--c); }
.dm tbody th { border-right: 4px solid var(--c); text-align: right; padding: 0 10px 0 0; width: auto; white-space: nowrap; }
.dm th a { color: #222; font-weight: 700; font-size: 13px; text-decoration: none; display: block; padding: 6px 4px; }
.dm th.hl a { color: #000; text-decoration: underline; text-underline-offset: 3px; }
.dm td a { display: block; line-height: 46px; text-decoration: none; font: 700 17px/46px 'Arial Narrow', 'Roboto Condensed', Arial, sans-serif; border-radius: 0; transition: transform .12s, box-shadow .12s; }
.dm td a:hover, .dm td a:focus-visible { transform: scale(1.08); box-shadow: 0 0 0 2px #fff, 0 0 0 4px #111; outline: none; position: relative; z-index: 1; }
.dm .dm-0 { background: #f4f4f4; border-radius: 0; color: #bbb; font-size: 12px; }
.dm .dm-na { background: transparent; }

@media (max-width: 1100px) { .dcards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px)  { .dcards { grid-template-columns: 1fr; } }

/* ── Domain pages ─────────────────────────────────────── */
body.dom {
  margin: 0; background: #fff; color: #000;
  font: 16px/1.55 Arial, Helvetica, sans-serif;
  --gut: clamp(16px, 4.5vw, 64px); --max: 1200px;
  -webkit-text-size-adjust: 100%;
}
.dom *, .dom *::before, .dom *::after { box-sizing: border-box; }
.dom a { color: inherit; }
.dom img { max-width: 100%; }

.dbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 18px; padding: 0 var(--gut); height: 60px; background: #000; color: #fff; }
.dbar-name { font: 700 20px 'Arial Narrow', 'Roboto Condensed', Arial, sans-serif; color: #fff !important; text-decoration: none; white-space: nowrap; }
.dbar-nav { flex: 1; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.dbar-nav::-webkit-scrollbar { display: none; }
.dbar-nav a { font: 13px Arial, sans-serif; color: #c8c8c8; text-decoration: none; padding: 7px 10px; white-space: nowrap; border-bottom: 3px solid transparent; }
.dbar-nav a:hover { color: #fff; border-bottom-color: var(--c, #fff); }
.dbar-nav a[aria-current] { color: #fff; border-bottom-color: var(--c); font-weight: 700; }
.dbar-nav .dbar-all { color: #fff; }
.dbar-cta { font: 700 13px Arial, sans-serif; background: var(--accent); color: #fff !important; text-decoration: none; padding: 9px 14px; border-radius: 0; white-space: nowrap; }

.dom .btn { display: inline-block; font: 700 14px Arial, sans-serif; background: var(--accent); color: #fff !important; text-decoration: none; padding: 10px 16px; border-radius: 0; border: 0; cursor: pointer; }
.dom .btn-ghost { background: transparent; color: var(--accent) !important; box-shadow: inset 0 0 0 1.5px var(--accent); }

.dhero { background: var(--tint); border-bottom: 8px solid var(--accent); }
.dhero-in { max-width: var(--max); margin: 0 auto; padding: 48px var(--gut); display: grid; grid-template-columns: 300px 1fr; gap: 48px; align-items: center; }
.dhero-photo { aspect-ratio: 4 / 5; overflow: hidden; background: #ddd; }
.dhero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; display: block; }
.dhero-domain { font: 700 13px Arial, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.dhero-name { font: 700 clamp(34px, 5vw, 58px)/1.02 'Arial Narrow', 'Roboto Condensed', Arial, sans-serif; margin: 0 0 16px; letter-spacing: -.01em; }
.dhero-pos { font-size: clamp(18px, 2vw, 22px); line-height: 1.4; margin: 0 0 24px; max-width: 640px; color: #222; }
.dhero-links { display: flex; flex-wrap: wrap; gap: 10px; }

.dstats { background: var(--accent); color: #fff; }
.dstats-in { max-width: var(--max); margin: 0 auto; padding: 24px var(--gut); display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 18px; text-align: center; }
.dstat-n { display: block; font: 700 30px/1.1 'Arial Narrow', 'Roboto Condensed', Arial, sans-serif; }
.dstat-l { display: block; font-size: 13px; opacity: .88; margin-top: 4px; }

.dsec { padding: 52px 0; }
.dsec--tint { background: #f6f6f6; }
.dsec-in { max-width: var(--max); margin: 0 auto; padding: 0 var(--gut); }
.dsec-h { font: 700 32px/1.1 'Arial Narrow', 'Roboto Condensed', Arial, sans-serif; margin: 0 0 24px; padding-bottom: 10px; border-bottom: 3px solid var(--accent); display: flex; align-items: baseline; gap: 12px; }
.dsec-n { font: 700 14px Arial, sans-serif; color: var(--accent); }
.dprofile { max-width: 820px; font-size: 17px; }
.dprofile p { margin: 0 0 14px; }
.dnote { color: #555; font-size: 14px; margin: 6px 0 14px; }
.dtoc { display: flex; flex-wrap: wrap; gap: 8px; }
.dtoc a { font: 700 13px Arial, sans-serif; text-decoration: none; padding: 6px 11px; background: var(--tint); color: var(--accent); border-radius: 0; }

.its { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.it { background: #fff; border: 1px solid #ddd; border-left: 5px solid var(--accent); display: flex; flex-direction: column; min-width: 0; scroll-margin-top: 76px; }
.it.has-img { grid-row: span 1; }
.it-img { aspect-ratio: 16 / 9; overflow: hidden; background: #eee; }
.it-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.it-body { padding: 16px 18px 18px; }
.it-meta { font-size: 12px; color: #666; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px; }
.it-h { font: 700 19px/1.25 Arial, Helvetica, sans-serif; margin: 0 0 6px; }
.it-role { font-size: 14px; font-weight: 700; color: var(--accent); margin-bottom: 8px; }
.it-sum { font-size: 15px; line-height: 1.5; margin: 0 0 10px; color: #222; }
.it-links { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 8px; }
.it-links a { font-size: 14px; font-weight: 700; color: var(--accent); text-decoration: none; }
.it-links a:hover { text-decoration: underline; }
.it-cross { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-top: 10px; border-top: 1px dashed #ccc; font-size: 12px; color: #555; }
.it-cross span { margin-right: 2px; }
.dchip { font: 700 12px Arial, sans-serif; color: #fff !important; background: var(--c); padding: 3px 8px; border-radius: 0; text-decoration: none; }
.it:target { box-shadow: 0 0 0 3px var(--accent); }

.conn { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.conn-col { border-top: 5px solid var(--c); background: #fafafa; padding: 14px 16px; scroll-margin-top: 76px; }
.conn-col:target { box-shadow: 0 0 0 3px var(--c); }
.conn-h { font: 700 18px 'Arial Narrow', 'Roboto Condensed', Arial, sans-serif; margin: 0 0 8px; }
.conn-h a { color: var(--c); text-decoration: none; }
.conn-h span { color: #777; font: 13px Arial, sans-serif; }
.conn ul { margin: 0; padding-left: 18px; }
.conn li { font-size: 14px; margin-bottom: 5px; }
.conn li a { text-decoration: none; }
.conn li a:hover { text-decoration: underline; }
.conn-d { color: #666; font-size: 12px; white-space: nowrap; }

.dfoot { background: #000; color: #bbb; font-size: 13px; }
.dfoot-in { max-width: var(--max); margin: 0 auto; padding: 22px var(--gut); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; }
.dfoot a { color: #fff; }

@media (max-width: 860px) {
  .dhero-in { grid-template-columns: 1fr; gap: 24px; padding-top: 28px; padding-bottom: 32px; }
  .dhero-photo { max-width: 260px; }
  .its { grid-template-columns: 1fr; }
  .conn { grid-template-columns: 1fr; }
  .dbar { gap: 10px; }
  .dbar-name { font-size: 17px; }
}

/* ── Domain CV ────────────────────────────────────────── */
.cv { max-width: 880px; margin: 0 auto; padding: 32px var(--gut) 60px; font-size: 14px; line-height: 1.5; }
.cv-tools { display: flex; gap: 10px; margin-bottom: 24px; flex-wrap: wrap; }
.cv-head { display: flex; justify-content: space-between; gap: 24px; border-bottom: 4px solid var(--accent); padding-bottom: 16px; margin-bottom: 18px; }
.cv-domain { font: 700 12px Arial, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.cv-name { font: 700 34px/1.1 'Arial Narrow', 'Roboto Condensed', Arial, sans-serif; margin: 6px 0 8px; }
.cv-aff { color: #333; }
.cv-contact { color: #555; font-size: 13px; margin-top: 6px; }
.cv-photo { width: 110px; height: 136px; object-fit: cover; object-position: center 30%; flex: none; }
.cv-sec { margin: 0 0 18px; break-inside: auto; }
.cv-sec h2 { font: 700 15px Arial, sans-serif; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); border-bottom: 1px solid #ccc; padding-bottom: 4px; margin: 0 0 8px; break-after: avoid; }
.cv-sec p { margin: 0 0 8px; }
.cv-t { width: 100%; border-collapse: collapse; }
.cv-t td { vertical-align: top; padding: 4px 0; break-inside: avoid; }
.cv-d { width: 110px; color: #555; padding-right: 12px !important; white-space: nowrap; }
.cv-x { font-size: 12px; color: #666; white-space: nowrap; }
.cv-s { color: #444; font-size: 13px; margin-top: 2px; }
.cv-foot { font-size: 12px; color: #666; border-top: 1px solid #ccc; padding-top: 10px; }
@media (max-width: 560px) {
  .cv-head { flex-direction: column-reverse; }
  .cv-d { width: 76px; white-space: normal; }
}
@media print {
  @page { size: A4; margin: 16mm 15mm; }
  .dbar, .cv-tools, .cv-foot a { display: none !important; }
  body.dom { font-size: 10pt; }
  .cv { padding: 0; max-width: none; font-size: 9.5pt; }
  .cv-name { font-size: 22pt; }
  .cv-s { font-size: 8.5pt; }
  .cv-sec h2 { font-size: 10pt; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ── Alignment of the Domains section and image captions ── */
.dhub > .dhub-in { max-width: var(--measure, 1200px); margin-left: auto; margin-right: auto; }
.dhub-in > * { margin-left: 0; margin-right: 0; }
.dhub-h { font: 700 1.5rem/1.2 'Arial Narrow', 'Roboto Condensed', Arial, sans-serif; text-transform: uppercase; margin: 8px 0 10px; text-align: left; }
.dhub .dm { margin: 0; }

.dom figure, .dhub figure { margin: 0; }
/* Captions: small, light, run-in (what · where · who). */
.cap { display: block; padding: 6px 2px 0; font: 11px/1.4 Arial, Helvetica, sans-serif; color: #666; text-align: left; }
.cap span { display: inline; }
.cap-what { color: #444; }
.cap-what::after, .cap-where::after { content: ' \00b7  '; }
.cap--card { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cap--card .cap-where::after { content: none; }
.dcard-fig .cap { padding: 6px 16px 0; }
.dhero-fig .cap { max-width: 300px; }
.it-fig .cap { padding: 6px 18px 0; }

/* ── Working papers: title and domains only ── */
.wps { list-style: none; margin: 0 0 18px; padding: 0; columns: 2; column-gap: 36px; }
.wps li { break-inside: avoid; padding: 8px 0; border-bottom: 1px solid #e4e4e4; font-size: 15px; line-height: 1.4; scroll-margin-top: 76px; }
.wps li:target { background: var(--tint); }
.wp-t { margin-right: 8px; }
.wps .dchip { font-size: 11px; padding: 2px 7px; margin-right: 4px; vertical-align: 1px; white-space: nowrap; }
.wp-h { font: 700 14px Arial, Helvetica, sans-serif; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); margin: 22px 0 6px; }
.wp-h span { color: #666; font-weight: 400; margin-left: 6px; }
@media (max-width: 860px) { .wps { columns: 1; } }

/* ── Latest updates: main-page hero (dark blue band) ── */
.hero .now-stamp { font-weight: 400; letter-spacing: .02em; text-transform: none; opacity: .85; margin-left: 8px; }
.now-feature { transition: opacity .2s ease; }
.hero .now-h { min-height: 0; margin: 0 0 14px; font-size: clamp(22px, 2.3vw, 32px); }
.hero .now-h a { color: #fff; text-decoration: none; }
.hero .now-h a:hover { text-decoration: underline; text-underline-offset: 4px; }
.now-meta { font-size: 13px; color: rgba(255,255,255,.88); margin: 0 0 6px; text-transform: uppercase; letter-spacing: .05em; }
.now-controls { display: flex; align-items: center; gap: 8px; margin: 0 0 26px; padding: 0; flex-wrap: wrap; }
.now-btn { background: none; border: 1.5px solid rgba(255,255,255,.7); color: #fff; min-width: 40px; height: 40px; border-radius: 0; font: 700 20px/1 Arial, sans-serif; cursor: pointer; padding: 0 10px; }
.now-btn:hover { background: rgba(255,255,255,.16); border-color: #fff; }
.now-btn:focus-visible, .now-all:focus-visible, .now-list a:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.now-pause { font: 700 13px/1 Arial, sans-serif; letter-spacing: .04em; text-transform: uppercase; min-width: 72px; }
.now-count { font-size: 13px; color: rgba(255,255,255,.9); min-width: 40px; text-align: center; }
.now-all { color: #fff !important; font-size: 14px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; margin-left: 10px; padding: 10px 0; }
.now-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 26px; }
.now-list li { border-top: 1px solid rgba(255,255,255,.3); }
.now-list a { display: block; padding: 10px 0 12px; font-size: 14px; line-height: 1.45; color: rgba(255,255,255,.95); text-decoration: none; }
.now-list a:hover { text-decoration: underline; text-underline-offset: 3px; }
.now-d { display: block; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.85); margin-bottom: 2px; }
.now-up { display: inline-block; background: #fff; color: #00548a; font-size: 10px; letter-spacing: .04em; padding: 1px 6px; border-radius: 0; margin-left: 4px; }
@media (max-width: 860px) {
  /* phone: name, then the buttons, then the updates */
  .hero-text { display: flex; flex-direction: column; }
  .hero-name { order: -3; margin-bottom: 18px; }
  .hero-cta { order: -2; margin: 0 0 28px; }
  .hero-text > * { order: 0; }
  .hero-name { order: -3; }
  .hero-cta { order: -2; }
  .now-list { grid-template-columns: 1fr; }
  .now-list li:nth-child(n+4) { display: none; }
  .hero .now-h { font-size: clamp(20px, 5.4vw, 26px); }
}

/* ── updates.html ── */
.ups { list-style: none; margin: 0 0 10px; padding: 0; }
.ups li { display: grid; grid-template-columns: 110px 1fr auto; gap: 14px; padding: 10px 0; border-bottom: 1px solid #e4e4e4; align-items: baseline; }
.up-d { font-size: 12px; color: #666; text-transform: uppercase; letter-spacing: .04em; }
.up-b a { color: #000; text-decoration: none; font-size: 15px; line-height: 1.4; }
.up-b a:hover { text-decoration: underline; }
.up-m { display: block; font-size: 12.5px; color: #666; margin-top: 2px; }
.up-c { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.up-c .dchip { font-size: 11px; padding: 2px 7px; }
@media (max-width: 640px) { .ups li { grid-template-columns: 1fr; gap: 4px; } .up-c { justify-content: flex-start; } }

/* Event cards on the main page: crop thumbnails to 3:2 whatever the image's own size. */
.ev-card img { height: auto; }

/* ── Accessibility and touch: skip link, tap targets, domain bar on phones ── */
.skip { position: absolute; left: 8px; top: -64px; z-index: 200; background: #fff; color: #000 !important; padding: 10px 14px; font: 700 14px Arial, Helvetica, sans-serif; border-radius: 0; text-decoration: none; box-shadow: 0 2px 10px rgba(0,0,0,.35); }
.skip:focus { top: 8px; }
main:focus { outline: none; }
.dchip { display: inline-flex; align-items: center; min-height: 24px; line-height: 1; }
.dtoc a { padding: 9px 12px; }
.conn li a, .it-links a { display: inline-block; padding: 6px 0; }
.conn li { margin-bottom: 0; }
@media (pointer: coarse) {
  .dchip { min-height: 32px; padding: 0 12px; }
  .wps .dchip, .it-cross .dchip { margin: 2px 4px 2px 0; }
  .wps li { padding: 10px 0; }
  .chip-filter { min-height: 40px; }
  .view-all { display: inline-block; padding: 12px 0; }
}
.dbar-nav a { padding: 11px 11px; }
.it, .conn-col, .wps li { scroll-margin-top: 76px; }
@media (max-width: 700px) {
  .dbar { height: auto; flex-wrap: wrap; gap: 0 12px; padding-top: 8px; padding-bottom: 0; }
  .dbar-name { order: 1; line-height: 40px; }
  .dbar-cta { display: inline-block !important; order: 2; margin-left: auto; padding: 10px 14px; }
  .dbar-nav { order: 3; flex: 1 0 100%; margin: 4px calc(var(--gut) * -1) 0; padding: 0 var(--gut) 0 var(--gut);
    -webkit-mask-image: linear-gradient(90deg, #000 86%, transparent); mask-image: linear-gradient(90deg, #000 86%, transparent); }
  .dbar-nav::after { content: ''; flex: 0 0 56px; }
  .it, .conn-col, .wps li { scroll-margin-top: 120px; }
}
@media (pointer: coarse) { .dfoot a { display: inline-block; padding: 10px 4px; } }

/* ── Videos (click to play), case study, tool details ── */
.dom .vids { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.dom .vid { margin: 0; min-width: 0; }
.dom .vid-play, .dom .vid > video, .dom .vid-frame { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; border: 0; padding: 0; border-radius: 0; }
.dom .vid-play { position: relative; cursor: pointer; overflow: hidden; }
.dom .vid-play img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dom .vid-ico { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 0; background: rgba(0,0,0,.72); box-shadow: 0 0 0 2px #fff inset; transition: background .15s, transform .15s; }
.dom .vid-ico::after { content: ''; position: absolute; left: 25px; top: 19px; border-left: 20px solid #fff; border-top: 13px solid transparent; border-bottom: 13px solid transparent; }
.dom .vid-play:hover .vid-ico, .dom .vid-play:focus-visible .vid-ico { background: var(--accent); transform: scale(1.06); }
.dom .vid-play:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.dom .vid figcaption { font-size: 13.5px; line-height: 1.45; color: #333; padding-top: 8px; }
.dom .vid figcaption b { color: var(--accent); text-transform: uppercase; letter-spacing: .05em; font-size: 11.5px; margin-right: 6px; }
.dom .vid figcaption a { color: #555; white-space: nowrap; margin-left: 4px; }

.dom .figs { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin: 22px 0; }
.dom .fig { background: var(--tint); border-top: 4px solid var(--accent); padding: 14px 16px; }
.dom .fig b { display: block; font: 700 28px/1.1 'Arial Narrow', 'Roboto Condensed', Arial, sans-serif; color: #111; }
.dom .fig span { display: block; font-size: 13px; line-height: 1.4; color: #333; margin-top: 4px; }
.dom .case { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.dom .case-text p { margin: 0 0 12px; font-size: 16px; line-height: 1.55; }
.dom .lessons { margin: 0 0 14px; padding-left: 22px; max-width: 860px; }
.dom .lessons li { margin-bottom: 10px; line-height: 1.55; font-size: 15.5px; }
.dom .it-detail { font-size: 14px; color: #444; }
.dom .it-extra { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 10px; }
.dom .it-extra img { height: 110px; width: auto; border: 1px solid #ddd; display: block; }
@media (max-width: 860px) { .dom .case { grid-template-columns: 1fr; gap: 18px; } }

/* ── Highlights and media strip (main page); media.html ── */
.dhl-in { max-width: var(--measure, 1200px); margin-left: auto; margin-right: auto; }
.dhl-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 20px; }
.dhl-grid > .dhl-card { grid-column: span 2; }
.dhl-card:first-child:nth-last-child(5) ~ .dhl-card:nth-child(n+4) { grid-column: span 3; }
.dhl-card:first-child:nth-last-child(5) ~ .dhl-card:nth-child(n+4) .dhl-media { aspect-ratio: 21 / 9; }
.dhl-card { background: #fff; border-top: 5px solid var(--c); display: flex; flex-direction: column; min-width: 0; box-shadow: 0 1px 0 rgba(0,0,0,.08); }
.dhl-media { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--t); }
.dhl-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.dhl-card:hover .dhl-media img { transform: scale(1.03); }
.dhl-stat { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding: 0 22px; background: var(--c); color: #fff; }
.dhl-stat b { font: 700 clamp(30px, 3.4vw, 44px)/1.05 'Arial Narrow', 'Roboto Condensed', Arial, sans-serif; }
.dhl-stat span { font: 14px/1.4 Arial, Helvetica, sans-serif; opacity: .95; margin-top: 6px; }
.dhl-body { padding: 14px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.dhl-k { font: 700 11px/1.3 Arial, sans-serif; letter-spacing: .07em; text-transform: uppercase; color: var(--c); margin-bottom: 6px; }
.dhl-h { font: 700 21px/1.18 'Arial Narrow', 'Roboto Condensed', Arial, sans-serif; margin: 0 0 8px; }
.dhl-h a { color: #000; text-decoration: none; }
.dhl-h a:hover { color: var(--c); text-decoration: underline; }
.dhl-p { font: 14.5px/1.5 Arial, Helvetica, sans-serif; color: #333; margin: 0 0 12px; flex: 1; }
.dhl-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.mstrip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-bottom: 12px; }
.mcard { display: flex; flex-direction: column; background: #f6f6f6; text-decoration: none; color: #000; min-width: 0; border-top: 4px solid #006dae; }
.mcard:hover .mcard-t { text-decoration: underline; }
.mcard-img { display: flex; align-items: center; justify-content: center; aspect-ratio: 3 / 2; overflow: hidden; background: #e8f1f8; color: #00548a; font: 700 18px/1.2 'Arial Narrow', 'Roboto Condensed', Arial, sans-serif; text-align: center; padding: 10px; }
.mcard-img img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.mcard-b { display: block; padding: 10px 14px 14px; }
.mcard-m { display: block; font: 12px/1.35 Arial, sans-serif; color: #666; margin-bottom: 4px; }
.mcard-t { display: block; font: 700 16px/1.28 Arial, Helvetica, sans-serif; }
.dhub-intro a { font-weight: 700; color: #006dae; }
.dom .mds { list-style: none; margin: 0; padding: 0; }
.dom .md { display: grid; grid-template-columns: 220px 1fr; gap: 22px; padding: 18px 0; border-bottom: 1px solid #e4e4e4; }
.dom .md-img { aspect-ratio: 3 / 2; overflow: hidden; background: #e8f1f8; display: flex; align-items: center; justify-content: center; font: 700 16px 'Arial Narrow', 'Roboto Condensed', Arial, sans-serif; color: #00548a; text-align: center; padding: 8px; }
.dom .md-img img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.dom .md-h { font: 700 20px/1.25 Arial, Helvetica, sans-serif; margin: 2px 0 6px; }
.dom .md-h a { color: #000; text-decoration: none; }
.dom .md-h a:hover { text-decoration: underline; }
.dom .md-s { font-size: 15px; line-height: 1.5; margin: 0 0 8px; color: #333; }
.dom .md .up-c { justify-content: flex-start; }
@media (max-width: 1000px) { .dhl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dhl-grid > .dhl-card, .dhl-card:first-child:nth-last-child(5) ~ .dhl-card:nth-child(n+4) { grid-column: auto; } .dhl-card:first-child:nth-last-child(5) ~ .dhl-card:nth-child(n+4) .dhl-media { aspect-ratio: 16 / 9; } .mstrip { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .dhl-grid, .mstrip { grid-template-columns: 1fr; } .dom .md { grid-template-columns: 1fr; gap: 10px; } }

/* Wordmark: name inside a thin border; the border colour is the page's --edge (domain pages) or light blue. */
.wm { display: inline-block; border: 1px solid var(--edge, #6cb4e4); padding: 8px 14px; font: 700 15px/1 'Roboto Condensed', 'Arial Narrow', Arial, sans-serif; letter-spacing: .2em; text-transform: uppercase; color: #fff; white-space: nowrap; transition: background .15s, color .15s; }
a:hover > .wm { background: var(--edge, #6cb4e4); color: #000; }
a:focus-visible > .wm { outline: 2px solid #fff; outline-offset: 3px; }
@media (max-width: 700px) { .wm { font-size: 13px; padding: 7px 11px; letter-spacing: .16em; } }

/* ── Work across domains: figures, tooltip, key, strongest links ── */
.xd-figs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 6px 0 26px; }
.xd-fig { border-top: 4px solid #006dae; background: #f4f8fb; padding: 14px 16px; }
.xd-fig b { display: block; font: 700 34px/1.05 'Arial Narrow', 'Roboto Condensed', Arial, sans-serif; color: #111; }
.xd-fig span { display: block; font: 13.5px/1.4 Arial, sans-serif; color: #333; margin-top: 4px; }
.xd > * { min-width: 0; }
.xd-map { position: relative; }
.xd { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 36px; align-items: start; }
.dm-tip { position: absolute; z-index: 5; width: 300px; background: #111; color: #fff; padding: 12px 14px; border-radius: 0; font: 13px/1.45 Arial, sans-serif; box-shadow: 0 8px 24px rgba(0,0,0,.25); pointer-events: none; }
.dm-tip b { display: block; margin-bottom: 6px; font-size: 13.5px; }
.dm-tip ul { margin: 0 0 4px; padding-left: 16px; }
.dm-tip li { margin-bottom: 3px; }
.dm-tip span { color: #cfe3f3; }
.dm-key { display: flex; align-items: center; gap: 6px; font: 12.5px Arial, sans-serif; color: #444; margin-top: 10px; flex-wrap: wrap; }
.dm-key span { margin-right: 6px; }
.dm-key i { width: 22px; height: 14px; border-radius: 0; display: inline-block; }
.dm-key em { font-style: normal; margin-right: 8px; }
.xd-h { font: 700 13px Arial, sans-serif; letter-spacing: .07em; text-transform: uppercase; color: #333; margin: 0 0 10px; }
.dl { list-style: none; margin: 0; padding: 0; }
.dl a { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) 28px; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid #e6e6e6; text-decoration: none; color: #111; }
.dl a:hover .dl-l { text-decoration: underline; }
.dl-l { font: 14px/1.3 Arial, sans-serif; display: flex; align-items: center; gap: 0; }
.dl-l i { width: 8px; height: 18px; display: inline-block; flex: none; }
.dl-l i + i { margin-right: 8px; }
.dl-bar { height: 10px; background: #eef2f6; border-radius: 0; overflow: hidden; }
.dl-bar span { display: block; height: 100%; background: #256abf; border-radius: 0; }
.dl-n { font: 700 16px 'Arial Narrow', 'Roboto Condensed', Arial, sans-serif; text-align: right; }
@media (max-width: 1100px) { .xd { grid-template-columns: minmax(0, 1fr); } .xd-figs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .xd-fig b { font-size: 28px; } .dm th, .dm td { width: 46px; height: 40px; } .dm td a { line-height: 40px; font-size: 15px; } .dm th a { font-size: 11.5px; } }

/* Clickable cards, tiles and item pages */
.it { position: relative; transition: box-shadow .15s, border-color .15s; }
.it:hover { box-shadow: 0 4px 16px rgba(0,0,0,.12); border-color: var(--accent); }
.it-link { color: inherit; text-decoration: none; }
.it-link::after { content: ''; position: absolute; inset: 0; z-index: 1; }
.it-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.it-link:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.it .it-links a, .it .it-cross a, .it .it-extra a, .it .dchip { position: relative; z-index: 2; }
.wp-t a { color: inherit; text-decoration: none; }
.wp-t a:hover { text-decoration: underline; text-underline-offset: 3px; }
a.dstat, a.fig, a.xd-fig { color: inherit; text-decoration: none; display: block; transition: transform .15s, box-shadow .15s; }
a.dstat:hover, a.fig:hover, a.xd-fig:hover { transform: translateY(-2px); box-shadow: 0 4px 14px rgba(0,0,0,.18); }
a.dstat:focus-visible, a.fig:focus-visible, a.xd-fig:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
a.fig:focus-visible, a.xd-fig:focus-visible { outline-color: var(--accent, #006dae); }
a.stat, a.cell { color: inherit; text-decoration: none; display: block; }
a.stat:hover .stat-n { text-decoration: underline; }
a.cell:focus-visible, a.stat:focus-visible { outline: 3px solid #006dae; outline-offset: 2px; }
.crumb { font: 13.5px/1.4 Arial, sans-serif; margin: 0 0 10px; }
.crumb a { color: var(--accent); }
.crumb span { margin: 0 4px; color: #666; }
.ip-h { font: 700 clamp(26px, 4vw, 40px)/1.15 Arial, sans-serif; margin: 0 0 14px; max-width: 900px; }
.ip-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.ip { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 32px; align-items: start; }
.ip-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px 20px; margin: 0 0 20px; }
.ip-facts dt { font: 700 12px/1.3 Arial, sans-serif; text-transform: uppercase; letter-spacing: .06em; color: #444; }
.ip-facts dd { margin: 2px 0 0; font: 16px/1.4 Arial, sans-serif; }
.ip-sum { font: 17px/1.6 Arial, sans-serif; max-width: 68ch; margin: 0 0 14px; }
.ip-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.ip-fig { margin: 0; } .ip-fig img { width: 100%; height: auto; display: block; border: 1px solid #ddd; }
.rel { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.rel li { background: #fff; border: 1px solid #ddd; border-left: 5px solid var(--accent); padding: 12px 14px; display: flex; flex-wrap: wrap; gap: 8px 14px; justify-content: space-between; align-items: center; }
.rel a { color: inherit; text-decoration: none; display: block; }
.rel a:hover .rel-t { text-decoration: underline; }
.rel-m { display: block; font: 12.5px/1.3 Arial, sans-serif; color: #444; }
.rel-t { display: block; font: 700 16px/1.3 Arial, sans-serif; }
.rel-c { display: flex; gap: 6px; flex-wrap: wrap; }
@media (max-width: 820px) { .ip { grid-template-columns: 1fr; } }

/* Portrait video clips */
.dom .vid--v > video { aspect-ratio: 9 / 16; max-height: 560px; width: auto; max-width: 100%; margin: 0 auto; }
.dom .vid--v figcaption { text-align: center; }
.dom .vids .vid--v { grid-row: span 1; }
.ip-vid { margin: 8px 0 18px; text-align: left; }
.ip-vid > video { margin: 0; }
.ip-vid figcaption { text-align: left; }

/* Long-form item sections */
.ip-secs { display: grid; gap: 30px; max-width: 980px; }
.ip-sec-h { font: 700 24px/1.2 'Arial Narrow', 'Roboto Condensed', Arial, sans-serif; margin: 0 0 10px; border-top: 4px solid var(--accent); padding-top: 10px; }
.ip-ul { margin: 0 0 14px; padding-left: 22px; font: 16.5px/1.55 Arial, sans-serif; max-width: 72ch; } .ip-ul li { margin-bottom: 6px; }
.ip-tw { overflow-x: auto; margin: 6px 0 14px; }
.ip-table { border-collapse: collapse; width: 100%; font: 15px/1.45 Arial, sans-serif; background: #fff; }
.ip-table th, .ip-table td { border: 1px solid #d8d8d8; padding: 9px 12px; text-align: left; vertical-align: top; }
.ip-table thead th { background: var(--tint); }
.ip-table td.num { text-align: right; white-space: nowrap; }
.ip-table tbody tr:last-child td { font-weight: 700; }

/* Domain labels: coloured border and text, white fill */
.dchip { background: #fff; color: var(--c) !important; border: 1.5px solid var(--c); box-sizing: border-box; padding-top: 1.5px; padding-bottom: 1.5px; }
.dchip:hover, .dchip:focus-visible { background: var(--c); color: #fff !important; }

/* Per-domain context on item pages */
.idoms { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.idom { background: #fff; border: 1px solid #d8d8d8; border-top: 5px solid var(--c); padding: 16px 18px; min-width: 0; }
.idom-h { font: 700 20px/1.2 'Arial Narrow', 'Roboto Condensed', Arial, sans-serif; margin: 0 0 6px; }
.idom-h a { color: var(--c); text-decoration: none; } .idom-h a:hover { text-decoration: underline; }
.idom-k { display: block; font: 700 11px/1.3 Arial, sans-serif; letter-spacing: .07em; text-transform: uppercase; color: #555; margin-top: 4px; }
.idom-p { font: 15.5px/1.5 Arial, sans-serif; margin: 8px 0; }
.idom-m { font: 14px/1.5 Arial, sans-serif; color: #444; margin: 0 0 10px; }
.idom-l span { font: 700 11px/1.3 Arial, sans-serif; letter-spacing: .07em; text-transform: uppercase; color: var(--c); }
.idom-l ul { margin: 4px 0 10px; padding-left: 18px; font: 14px/1.45 Arial, sans-serif; } .idom-l li { margin-bottom: 3px; }
.idom-a { font: 700 13.5px Arial, sans-serif; margin: 0; } .idom-a a { color: var(--c); }

/* Websites grid (home): large screenshot cards */
.ws-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.ws-card { background: #fff; border: 1px solid #e2e2e2; border-top: 5px solid var(--c); display: flex; flex-direction: column; min-width: 0; }
.ws-media { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--t); border-bottom: 1px solid #e2e2e2; }
.ws-media img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; transition: transform .3s; }
.ws-card:hover .ws-media img { transform: scale(1.03); }
.ws-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.ws-h { font: 700 20px/1.25 Arial, sans-serif; margin: 0; }
.ws-h a { color: #111; text-decoration: none; }
.ws-h a:hover { color: var(--c); text-decoration: underline; }
.ws-url { font: 13px Arial, sans-serif; color: #555; text-decoration: none; word-break: break-all; }
.ws-url:hover { color: var(--c); text-decoration: underline; }
.ws-body .dhl-p { flex: 1; }
.ws-more { font: 700 13px Arial, sans-serif; color: #222; margin-left: auto; text-decoration: none; padding: 4px 0; }
.ws-more:hover { text-decoration: underline; }
@media (max-width: 1000px) { .ws-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .ws-grid { grid-template-columns: 1fr; } }
.ws-media { position: relative; }
.ws-lock { position: absolute; top: 12px; right: 12px; background: #111; color: #fff; font: 700 12px Arial, sans-serif; padding: 6px 10px; letter-spacing: .02em; }
@media (min-width: 1001px) { .ws-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; } .ws-grid--4 .ws-h { font-size: 18px; } }
