/* payments-innovation.com - the one stylesheet of the site.
   Colours and fonts are set in the ":root" block below. */

/* ---------- Fonts (stored in ../fonts, no outside font service) ---------- */
@font-face { font-family: "Jost"; font-style: normal; font-weight: 300; font-display: swap;
  src: url("../fonts/jost-latin-300-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Jost"; font-style: normal; font-weight: 300; font-display: swap;
  src: url("../fonts/jost-latin-ext-300-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Jost"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/jost-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Jost"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/jost-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Jost"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("../fonts/jost-latin-400-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Jost"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("../fonts/jost-latin-ext-400-italic.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Jost"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/jost-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Jost"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/jost-latin-ext-600-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }

/* ---------- Colours and fonts for each part of the site ---------- */
:root {
  --paper: #ffffff;
  --mist: #f2f4f6;
  --ink: #0f2147;          /* PIC navy */
  --soft: #51607d;
  --line: #d9dee5;
  --accent: #ffc000;       /* PIC gold - rules and underlines only, never text */
  --link: #0f2147;
  --body-font: "Jost", "Century Gothic", "Helvetica Neue", Arial, sans-serif;
  --head-font: "Jost", "Century Gothic", "Helvetica Neue", Arial, sans-serif;
  --ui-font: "Jost", "Century Gothic", Arial, sans-serif;
  --body-size: 1.125rem;
  --leading: 1.6;
  --measure: 46rem;
  --head-weight: 300;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 1rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--body-font);
  font-size: var(--body-size); line-height: var(--leading); text-rendering: optimizeLegibility; }
img, video, iframe, audio { max-width: 100%; }
img { height: auto; }
a { color: var(--link); text-decoration: underline; text-decoration-color: var(--accent);
  text-decoration-thickness: 0.09em; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 0.16em; }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }
.wrap { max-width: 68rem; margin: 0 auto; padding: 0 1.5rem; }
.skip { position: absolute; left: -999rem; }
.skip:focus { left: 1rem; top: 1rem; background: var(--paper); padding: 0.5rem 1rem; z-index: 10; }

/* ---------- Header and navigation ---------- */
.site-header { border-bottom: 1px solid var(--line); }
.header-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.5rem 2rem; padding-top: 1.1rem; padding-bottom: 1.1rem; }
.brand { display: inline-flex; align-items: center; gap: 0.7rem; text-decoration: none; color: var(--ink); }
.brand-name { font-family: var(--head-font); font-size: 1.45rem; line-height: 1.2; }
.site-nav ul { display: flex; flex-wrap: wrap; gap: 0.2rem 1.4rem; list-style: none; margin: 0; padding: 0; }
.site-nav a { font-family: var(--ui-font); font-size: 1rem; text-decoration: none; padding: 0.3rem 0;
  border-bottom: 2px solid transparent; display: inline-block; }
.site-nav a:hover { border-bottom-color: var(--line); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--accent); }

.site-header { border-bottom: 3px solid var(--accent); }
.brand { flex-direction: column; align-items: flex-start; gap: 0; }
.brand-name { font-weight: 600; font-size: 1.3rem; }
.brand-tag { font-size: 0.95rem; color: var(--soft); }


/* ---------- Page and prose ---------- */
.page { padding-top: 3rem; padding-bottom: 4rem; }
.page > h1, .page > .crumb, .page > .lede, .prose > * { max-width: min(100%, var(--measure)); }
.page-wide .prose > * { max-width: 100%; }
.crumb { margin: 0 0 0.6rem; font-size: 0.95rem; color: var(--soft); }
.crumb a { color: var(--soft); }
.crumb a::before { content: "\2190\00a0"; }
h1, h2, h3, h4 { font-family: var(--head-font); font-weight: var(--head-weight); line-height: 1.15; text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 5.5vw, 3.6rem); margin: 0 0 1.5rem; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.1rem); margin: 3rem 0 1rem; }
h3 { font-size: 1.4rem; margin: 2.4rem 0 0.8rem; }
h4 { font-size: 1.15rem; margin: 2rem 0 0.6rem; font-family: var(--body-font); font-weight: 700; }
h4 { font-weight: 600; }
strong, b { font-weight: 600; }
.lede { font-size: 1.3rem; line-height: 1.5; color: var(--soft); margin: 0 0 2rem; }
.prose p, .prose ul, .prose ol, .prose blockquote, .prose table, .prose figure, .prose pre { margin: 0 0 1.2rem; }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose li { margin-bottom: 0.4rem; }
.prose li > ul, .prose li > ol { margin: 0.4rem 0 0; }
.prose blockquote { border-left: 3px solid var(--accent); padding: 0.2rem 0 0.2rem 1.2rem; color: var(--soft); }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose img { border-radius: 2px; }
.prose img.left { float: left; margin: 0.3rem 1.5rem 1rem 0; max-width: 45%; }
.prose img.right { float: right; margin: 0.3rem 0 1rem 1.5rem; max-width: 45%; }
.prose img.centre { display: block; margin-left: auto; margin-right: auto; }
.prose h2, .prose h3, .prose h4, .prose hr, .prose figure, .prose .gallery, .prose table { clear: both; }
.prose figure { margin-left: 0; margin-right: 0; }
.prose figcaption { font-size: 0.92rem; color: var(--soft); margin-top: 0.4rem; line-height: 1.45; }
.prose small { font-size: 0.9em; }
.prose pre { white-space: pre-wrap; font: inherit; }
.prose table { border-collapse: collapse; width: 100%; font-size: 0.97rem; display: block; overflow-x: auto; }
.prose th, .prose td { border-bottom: 1px solid var(--line); padding: 0.5rem 0.8rem 0.5rem 0; text-align: left; vertical-align: top; }
.prose audio { width: 100%; }
.prose video { display: block; height: auto; }
.video { position: relative; aspect-ratio: 16 / 9; background: var(--mist); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Picture galleries */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: 1.5rem 1.2rem;
  margin: 2rem 0; max-width: 100% !important; align-items: start; }
.gallery figure { margin: 0; }
.gallery img { display: block; width: 100%; }

/* Year navigation on long dated lists (lectures, publications) */
.years { display: flex; flex-wrap: wrap; gap: 0.2rem 0.9rem; padding: 0.8rem 0; margin: 0 0 1.5rem;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 0.98rem; max-width: 100% !important; }
.years a { text-decoration: none; font-variant-numeric: tabular-nums; }
.years a:hover { text-decoration: underline; text-decoration-color: var(--accent); }
.prose h2.year, .prose h3.year { font-size: 2rem; margin-top: 3.2rem; padding-top: 0.8rem; border-top: 1px solid var(--line); }
.prose h2.year, .prose h3.year { border-top: 3px solid var(--accent); display: inline-block; padding-right: 2rem; }

/* Word cloud on the older lectures page */
.tagcloud { line-height: 1.9; }
.tagcloud span { margin-right: 0.5rem; white-space: nowrap; }
.tagcloud .t0 { font-size: 0.8rem; } .tagcloud .t1 { font-size: 0.9rem; } .tagcloud .t2 { font-size: 1rem; }
.tagcloud .t3 { font-size: 1.15rem; } .tagcloud .t4 { font-size: 1.3rem; } .tagcloud .t5 { font-size: 1.5rem; }
.tagcloud .t6 { font-size: 1.7rem; } .tagcloud .t7 { font-size: 1.9rem; } .tagcloud .t8 { font-size: 2.1rem; }
.tagcloud .t9 { font-size: 2.3rem; } .tagcloud .t10 { font-size: 2.6rem; }

/* Lists of pages (stories index, private index) */
.index-list { list-style: none; padding: 0 !important; margin: 0 0 2rem; }
.index-list li { padding: 1rem 0; border-bottom: 1px solid var(--line); margin: 0; }
.index-list a { font-family: var(--head-font); font-size: 1.5rem; text-decoration: none; }
.index-list a:hover { color: var(--accent); }
.index-list span { display: block; color: var(--soft); font-size: 1rem; }

/* ---------- Work ---------- */
.profile-head { display: grid; grid-template-columns: minmax(0, 1fr) 15rem; gap: 3rem; align-items: start; padding-top: 3.5rem; }
.profile-head img { width: 100%; border-radius: 2px; }
.profile-head h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); margin-bottom: 0.4rem; }
.profile-head .post-nominals { color: var(--soft); margin: 0 0 1.5rem; font-size: 1.02rem; }
.profile-head .lede { color: var(--ink); max-width: 40rem; }
@media (max-width: 46rem) { .profile-head { grid-template-columns: 1fr; } .profile-head img { max-width: 13rem; } }
.button { display: inline-block; padding: 0.65rem 1.3rem; background: var(--ink); color: #fff; text-decoration: none;
  border-radius: 3px; font-family: var(--ui-font); font-size: 1rem; }
.button:hover { background: #000; }
.button.quiet { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.button.quiet:hover { background: var(--mist); }
.button-row { display: flex; flex-wrap: wrap; gap: 0.8rem; margin: 1.5rem 0; }
.logo-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: 1rem; margin: 2rem 0;
  max-width: 100% !important; list-style: none; padding: 0 !important; }
.logo-wall li { margin: 0; display: grid; place-items: center; height: 6rem; padding: 0.9rem; border: 1px solid var(--line); border-radius: 3px; background: #fff; }
.logo-wall img { max-height: 100%; max-width: 100%; object-fit: contain; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 1.5rem 2.5rem; margin: 2.5rem 0;
  padding: 1.8rem 0; border-top: 3px solid var(--accent); border-bottom: 1px solid var(--line); max-width: 100% !important; }
.facts div { margin: 0; }
.facts dt { font-weight: 600; font-size: 1.05rem; }
.facts dd { margin: 0.2rem 0 0; color: var(--soft); font-size: 1rem; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: 3rem; font-size: 0.95rem; color: var(--soft); font-family: var(--ui-font); }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem; padding-top: 1.5rem; padding-bottom: 2.5rem; }
.footer-row p { margin: 0; }
.footer-row ul { display: flex; flex-wrap: wrap; gap: 0.3rem 1.3rem; list-style: none; margin: 0; padding: 0; }
.site-footer a { color: var(--soft); }

@media (max-width: 40rem) {
  body { font-size: 1.0625rem; }
  .prose img.left, .prose img.right { float: none; display: block; margin: 0 0 1rem; max-width: 100%; }
  .page { padding-top: 2rem; }
}
@media print { .site-header nav, .site-footer, .years, .skip { display: none; } a { text-decoration: none; } }
.years p { margin: 0; display: contents; }
.profile-head figure { margin: 0; }
.gallery img { width: auto; max-width: 100%; }
.logo-wall li { display: flex; align-items: center; justify-content: center; }
.logo-wall a { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.logo-wall img { max-height: 4.2rem; max-width: 100%; width: auto; height: auto; object-fit: contain; }
.prose::after { content: ""; display: block; clear: both; }
.prose > table { max-width: 100%; }
.prose { overflow-wrap: break-word; }

/* Announcements */
.news-list { list-style: none; padding: 0 !important; margin: 0; }
.news-list li { padding: 1.4rem 0; border-top: 1px solid var(--line); margin: 0; }
.news-list li:first-child { border-top: 3px solid var(--accent); }
.news-list h2 { font-size: 1.45rem; margin: 0.2rem 0 0.5rem; font-weight: 400; }
.news-list p { margin: 0 0 0.6rem; }
.news-date { color: var(--soft); font-size: 0.95rem; }
.news-list img { max-height: 11rem; width: auto; }
.video-own { display: block; width: 100%; height: auto; background: #000; }
.video { margin-bottom: 1.2rem; }
.clips { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1.5rem; max-width: 100% !important; }
.clips figure { margin: 0; }

/* Home page top and page titles (the alternative look in alt.css turns these into navy bands) */
.hero { padding-top: 3rem; }
.hero h1, .page-head h1, .page-head .crumb, .page-head .lede { max-width: min(100%, var(--measure)); }
.home-body { padding-top: 0; }
@media (max-width: 40rem) { .hero { padding-top: 2rem; } .home-body { padding-top: 0; } }
/* Parts that only the alternative look shows */
.alt-only { display: none; }
.look-switch button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer;
  text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 0.2em; }
.look-switch button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* YouTube videos: still picture with a play button; the player loads on click (script in base.njk) */
.yt a { position: absolute; inset: 0; display: block; background: #000; }
.yt a:hover { background: #000; }
.yt img { width: 100%; height: 100%; object-fit: contain; display: block; border-radius: 0; }
.yt-play { position: absolute; left: 50%; top: 50%; width: 4.6rem; height: 3.2rem; margin: -1.6rem 0 0 -2.3rem; border-radius: 0.6rem;
  background: var(--ink); overflow: hidden; text-indent: -999rem; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85); }
.yt-play::after { content: ""; position: absolute; left: 50%; top: 50%; margin: -0.65rem 0 0 -0.4rem;
  border-style: solid; border-width: 0.65rem 0 0.65rem 1.1rem; border-color: transparent transparent transparent #fff; }
.yt a:hover .yt-play, .yt a:focus-visible .yt-play { box-shadow: 0 0 0 3px var(--accent); }
.yt-note { position: absolute; left: 0; bottom: 0; padding: 0.25rem 0.7rem; background: rgba(15, 33, 71, 0.85); color: #fff; font-size: 0.85rem; }
.prose .clips { clear: both; margin-bottom: 1.2rem; }
.clips .video { margin-bottom: 0; }
