/* Additions the running site needs on top of design-system.css, which holds the design's own
   rules. Keep this file small. */

/* A real image inside a placeholder block fills it. The block's gradient shows only when a post has
   no image. */
.ph > img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}

/* The same for the image layer of a video card. */
.vthumb > img{width:100%;height:100%;object-fit:cover}

/* The design gives each interviewee avatar its own inline gradient. Without one, use the brand's. */
.iv-guest .av{background:linear-gradient(135deg,var(--brand),var(--brand-light))}

/* The footer has as many link columns as the CMS delivers (--footer-columns, set on the element).
   The design draws two; narrower screens keep the design's own one- and two-track grids. */
@media(min-width:861px){.footer .container{grid-template-columns:1.6fr repeat(var(--footer-columns,2),1fr)}}

/* A portrait inside a round avatar replaces the initials. */
.av > img{width:100%;height:100%;border-radius:50%;object-fit:cover}

/* Tags have no page of their own yet. A tag that is not a link does not react to the pointer. */
span.tag{pointer-events:none}

/* ---- Article body ----
   The CMS can put more into an article body than the design's sample article shows. These rules
   style the rest of its vocabulary in the design's terms (cms repo, docs/architecture/BODY_HTML_POLICY.md). */

/* An image in the body is a real <img>; the design draws a placeholder block. */
.figure img{display:block;width:100%;height:auto;border-radius:var(--radius)}

/* The CMS writes the play button without the icon the design draws inside it. */
.embed .eplay:empty::before{content:"";position:absolute;top:50%;left:50%;transform:translate(-40%,-50%);
  border-style:solid;border-width:11px 0 11px 19px;border-color:transparent transparent transparent #fff}

/* Quotations. The design has the pull quote only; a plain quotation is quieter. */
.prose blockquote{border-left:3px solid var(--border);padding:2px 0 2px 22px;margin:26px 0;
  font-family:var(--font-serif);font-size:18.5px;line-height:1.72;font-style:italic;color:var(--text-2)}
.prose blockquote > p{color:inherit;margin-bottom:12px}
.prose blockquote > p:last-child{margin-bottom:0}

/* Links outside paragraphs look like the links inside them. */
.prose li a,.prose blockquote a,.prose h2 a,.prose h3 a,.prose h4 a{color:var(--brand);text-decoration:underline;
  text-underline-offset:3px;text-decoration-thickness:1px}
.figure figcaption a,.art-hero .cap a{color:var(--brand);text-decoration:underline;text-underline-offset:2px}

/* A minor heading of the body itself, not the title of a fact box. */
.prose > h4{font-size:17px;line-height:1.3;margin:24px 0 8px}
.prose li > ul,.prose li > ol{margin-top:9px;margin-bottom:0}
.prose hr{border:0;border-top:1px solid var(--border);margin:32px 0}
.prose code{font-family:var(--font-mono);font-size:.88em;background:var(--brand-tint);border-radius:4px;padding:1px 5px}
.prose sub,.prose sup{font-size:.72em;line-height:0}

@media(max-width:860px){.prose blockquote{font-size:17.5px}}

/* The cover of a video fills its player. Without a cover, site.js shows YouTube's own picture. */
.player > img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}

/* ---- Interview page ----
   Rules the design's interview page carries inline and its stylesheet lacks. Copied unchanged. */
/* Interview lede: small photo floated left, intro text wraps beside it */
.iv-lede{margin:26px 0 8px;overflow:hidden}
.iv-lede .art-hero{float:left;width:260px;margin:0 24px 16px 0}
.iv-lede .art-hero .im{aspect-ratio:3/4;border-radius:var(--radius-sm)}
.iv-lede-text p{font-family:var(--font-serif);font-size:18.5px;line-height:1.72;color:var(--text)}
@media(max-width:560px){
  .iv-lede .art-hero{float:none;width:100%;margin:0 0 16px}
}
.prose p.qa-q{font-weight:700;color:var(--brand)}
.prose p.qa-a{color:var(--text-2)}

/* ---- Pages built from sections in the CMS ---- */
/* The design's legal pages are a single column; its stylesheet still has an older two-column grid. */
.doc{display:block}
/* A portrait in the team grid fills its square. */
.person .pav > img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}

/* ---- Events ----
   From the inline styles of the design's events.html: the listing shows its cards in a grid. */
.ev-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}
.ev-grid .ev-card{grid-template-columns:1fr;gap:10px;padding:14px;margin-bottom:0;align-items:stretch}
.ev-grid .ev-card h3{font-size:16px;margin:2px 0 4px}
.ev-grid .ev-card .evx{max-width:none;font-size:12.5px;-webkit-line-clamp:2;display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden}
.ev-grid .ev-facts{gap:8px}
.ev-grid .ev-facts span{font-size:10.5px}
.ev-grid .ev-cta{flex-direction:row;min-width:0;gap:6px}
.ev-grid .ev-cta .btn{flex:1;justify-content:center;padding:7px 10px;font-size:12px}
@media(max-width:860px){.ev-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:560px){.ev-grid{grid-template-columns:1fr}}
/* From event.html: a wider logo column and a larger name in the placeholder. */
.ev-hero{grid-template-columns:280px minmax(0,1fr);align-items:start;gap:30px}
.ev-logo{padding:26px;font-size:36px}
.ev-logo .k{font-size:11px;margin-top:12px}
@media(max-width:860px){.ev-hero{grid-template-columns:1fr}}
/* A real logo fills the placeholder, like any image there, with its rounded corners. */
.ev-logo > img{border-radius:inherit}
/* The region filters are links, so the listing works without JavaScript; the design draws buttons. */
.filterbar a.chip{line-height:normal;text-align:center}

/* ---- Magazine ---- */
/* The flipbook provider draws its own spread and controls in a frame inside the design's stage. */
.viewer .vstage > iframe{width:100%;height:100%;border:0;align-self:stretch;justify-self:stretch;background:var(--surface)}
.viewer .vtools a.abtn{display:grid;place-items:center}
/* A line of the contents without a page of its own. */
.mag-toc div.mt .tt{color:var(--text)}

/* ---- Editorial calendar ----
   From the inline styles of the design's calendar.html. */
.cal-issue .ci-themes ul{list-style:none;margin:0;padding:0}
.cal-issue .ci-events{margin-top:16px}
.cal-issue .ci-events .k{font-family:var(--font-mono);font-size:10.5px;letter-spacing:.12em;text-transform:uppercase;color:var(--text-muted);display:block;margin-bottom:8px}
.cal-issue .ci-events .ev-tags{display:flex;flex-wrap:wrap;gap:7px}
.cal-issue .ci-events .tag{font-size:11.5px;padding:5px 11px}
/* An issue that is out links to its page. */
.cal-issue .ci-date .ttl a{color:inherit}
.cal-issue .ci-date .ttl a:hover{color:var(--brand)}

/* ---- Publications ---- */
/* The download form of a gated resource takes no details yet; its fields sit in a disabled fieldset. */
.gate fieldset{border:0;margin:0;padding:0;min-width:0;display:flex;flex-direction:column;gap:11px}
/* Without gating the box holds the download link alone. */
.gate .gate-get{padding:16px 18px}

/* ---- Podcasts ---- */
/* The audio service's player takes the place of the bar once the listener presses play. */
.aframe{display:block;width:100%;height:152px;border:0;border-radius:var(--radius)}
/* Chapters cannot seek inside the service's player, so they are a list, not links. */
.timestamps a:not([href]):hover{background:none}

/* ---- Directory and rankings ---- */
/* A real logo fills its square on white, so dark and coloured logos both read. */
.co-logo > img{width:100%;height:100%;object-fit:contain;border-radius:inherit;background:#fff}
/* The ranking table scrolls inside its box on a phone; the design's table is wider than the screen. */
.rank-scroll{overflow-x:auto}

/* ---- Advertising ---- */
/* A zone with a banner shows the banner in place of the design's placeholder, still marked "AD". */
.ad.filled{background:var(--surface);border-style:solid}
.ad.filled::before{z-index:1;background:var(--surface);padding:1px 4px;border-radius:3px;opacity:.85}
.ad.filled > a{position:absolute;inset:0;display:block}
.ad.filled picture{display:contents}
.ad.filled img{display:block;width:100%;height:100%;object-fit:contain}

/* ---- Sharing ---- */
/* Copy link is a button; it looks like the design's share links. Hidden until share.js runs. */
button.share-btn{padding:0;font:inherit;cursor:pointer}
.share-btn[hidden]{display:none}
.share-btn[data-copied]{background:var(--brand);border-color:var(--brand);color:#fff}
/* Text for screen readers only, such as "Link copied". */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* ---- Utility bar ----
   The design's market ticker is left out: it has no data source. The links keep their place on the
   right, and on a phone, where the ticker was all the bar held, the bar is not shown. */
.utilitybar .util-links{margin-left:auto}
@media(max-width:560px){.utilitybar{display:none}}

/* ---- Accessibility ----
   Contrast to WCAG AA (4.5:1 for small text). The design's muted grey and its up and down colours
   are darkened a little in the light theme. In the dark theme, text on the light-blue brand (primary
   buttons, active chips, the pager, calendar tiles) uses --text-invert, which the design set to white:
   it becomes the dark background colour. */
:root{--text-muted:#5E6E89;--up:#15803D;--down:#C9353B}
html[data-theme="dark"]{--text-invert:#0A1120}
html[data-theme="dark"] .nl-input button{color:#1A5CFF}
/* The header's dropdown triggers are buttons, so the keyboard reaches them; they look like the links. */
.nav button.nav-link{background:none;border:0;cursor:pointer;text-align:start;line-height:inherit}
/* "Skip to main content", the first stop of the keyboard; shown only when focused. */
.skip-link{position:absolute;left:12px;top:-60px;z-index:1000;background:var(--surface);color:var(--brand);padding:10px 16px;border-radius:8px;box-shadow:var(--shadow-lg);font-weight:700}
.skip-link:focus{top:12px}

/* ---- Features the site does not have yet ----
   Search, sign-in and the newsletter are left out while their switch is off (Features). The phone's
   bottom bar shares its width among the items it has; without search and sign-in it is not shown,
   and the page needs no room for it at the bottom. */
.mobnav ul{grid-template-columns:none;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr)}
@media(max-width:860px){body.no-mobnav{padding-bottom:0}}
