/*
 * Author page (/author/{name}/), from the Pen boards "W · Author page · desktop",
 * "W · Author page · 12 items", "W · Author page · mobile" and "W · Author cards".
 * Loaded after opinion.css, whose lead card (.d2-olead) and newsletter panel
 * (.d2-onews) the page reuses. The cards follow the Learn grid (learn.css).
 */
.d2-whead__title, .d2-wall__title, .d2-wcard__title { font-variation-settings: "opsz" 18; }
.d2-auth { display: flex; flex-direction: column; }

/* Head: initials, name, credit and profile links, bio */
.d2-whead { display: flex; align-items: flex-start; gap: 24px; padding: 40px var(--shell-pad) 28px; }
.d2-whead__avatar { flex: none; display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: var(--logo-chip); font: 600 24px/28px var(--font-body); color: #fff; }
.d2-whead__text { flex: 0 1 760px; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.d2-whead__eyebrow { font: 400 11px/14px var(--font-mono); letter-spacing: 1.6px; text-transform: uppercase; color: var(--accent); }
.d2-whead__title { font-family: var(--font-heading); font-size: 52px; line-height: 52px; font-weight: 400; letter-spacing: -0.6px; color: var(--ink); }
.d2-whead__cred { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.d2-whead__credit { font: 600 14px/18px var(--font-body); color: var(--ink); }
.d2 .d2-whead__link { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-secondary); }
.d2 .d2-whead__link:hover { color: var(--accent); box-shadow: inset 0 0 0 1px var(--ink-muted); }
.d2-whead__bio { font-size: 17px; line-height: 26px; color: var(--ink-secondary); }
.d2-wtodo { align-self: stretch; display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 6px; background: var(--surface-alt); box-shadow: inset 0 0 0 1px var(--line); font-size: 13px; line-height: 19px; color: var(--ink-secondary); }
.d2-wtodo svg { flex: none; width: 15px; height: 15px; margin-top: 2px; }
.d2-wtodo strong { font-weight: 600; color: var(--ink); }
.d2-wtodo ul { margin: 4px 0 0; padding-left: 18px; list-style: disc; }
.d2-wtodo code { font: 400 12px/1 var(--font-mono); }

/* Latest: the opinion hub's lead card, full width */
.d2-wlatest { display: flex; padding: 12px var(--shell-pad) 40px; }
.d2-wlatest .d2-olead__img { aspect-ratio: auto; height: 360px; min-height: 100%; }
.d2-wlatest .d2-olead__link { margin-top: 0; }

/* All writing: Learn's cards, three across (two when there are only two) */
.d2-wall { display: flex; flex-direction: column; gap: 24px; padding: 0 var(--shell-pad) 48px; }
.d2-wall__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; padding-bottom: 12px; box-shadow: inset 0 -1px 0 var(--line); }
.d2-wall__title { font-family: var(--font-heading); font-size: 28px; line-height: 32px; font-weight: 400; color: var(--ink); }
.d2-wall__meta { font: 400 11px/14px var(--font-mono); letter-spacing: 1.3px; text-transform: uppercase; color: var(--ink-muted); }

/* Type filter: radios, so it works without a script */
.d2-wfilter { display: flex; flex-wrap: wrap; gap: 8px; }
.d2-wfilter__in { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.d2-wchip { display: inline-flex; align-items: center; gap: 8px; height: 33px; padding: 8px 14px; border-radius: 9999px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); font: 400 13px/17px var(--font-body); color: var(--ink); white-space: nowrap; cursor: pointer; }
.d2-wchip__n { font: 400 11px/14px var(--font-mono); color: var(--ink-muted); }
.d2-wchip:hover { box-shadow: inset 0 0 0 1px var(--ink-muted); }
.d2-wfilter__in:checked + .d2-wchip { background: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); color: var(--on-ink); }
.d2-wfilter__in:checked + .d2-wchip .d2-wchip__n { color: var(--footer-link); }
.d2-wfilter__in:focus-visible + .d2-wchip { outline: 2px solid var(--accent); outline-offset: 2px; }
.d2-auth:has(#d2-wf-guide:checked) .d2-wcard[data-type="opinion"],
.d2-auth:has(#d2-wf-opinion:checked) .d2-wcard[data-type="guide"] { display: none; }

.d2-wgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 24px; margin: 0; padding: 0; list-style: none; }
.d2-wgrid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.d2-wcard a { display: flex; flex-direction: column; gap: 10px; color: inherit; }
.d2 .d2-wcard a:hover { text-decoration: none; }
.d2 .d2-wcard a:hover .d2-wcard__title { color: var(--accent); }
.d2-wcard__img { display: block; width: 100%; height: auto; aspect-ratio: 421 / 200; border-radius: 8px; object-fit: cover; background: var(--surface-alt); }
.d2-wgrid--2 .d2-wcard__img { aspect-ratio: 644 / 300; }
.d2-wcard__meta { font: 400 10px/13px var(--font-mono); letter-spacing: 1.3px; text-transform: uppercase; }
.d2-wcard__type { color: var(--accent); }
.d2-wcard[data-type="opinion"] .d2-wcard__type { color: var(--gold-ink); }
.d2-wcard__when { color: var(--ink-muted); }
.d2-wcard__title { font-family: var(--font-heading); font-size: 22px; line-height: 26px; color: var(--ink); }
.d2-wcard__dek { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 14px; line-height: 20px; color: var(--ink-secondary); }

/* The column: the opinion hub's newsletter panel, with a label */
.d2-wcol .d2-onews__panel { padding: 28px 32px; }
.d2-wcol .d2-onews__text { gap: 6px; }
.d2-wcol__eyebrow { font: 400 11px/14px var(--font-mono); letter-spacing: 1.3px; text-transform: uppercase; color: var(--accent-bright); }
.d2 .d2-wcol .d2-onews__sub a { color: var(--accent-bright); text-decoration: underline; text-underline-offset: 3px; }

/* Tablets and small laptops: two across, narrower gutters */
@media (min-width: 761px) and (max-width: 1100px) {
  .d2-whead, .d2-wlatest, .d2-wall, .d2-wcol { padding-left: 24px; padding-right: 24px; }
  .d2-wlatest .d2-olead__img { width: 46%; height: auto; }
  .d2-wgrid, .d2-wgrid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .d2-wcard__img, .d2-wgrid--2 .d2-wcard__img { aspect-ratio: 16 / 9; }
}
@media (min-width: 1101px) and (max-width: 1340px) {
  .d2-whead, .d2-wlatest, .d2-wall, .d2-wcol { padding-left: 24px; padding-right: 24px; }
  .d2-wlatest .d2-olead__img { width: 46%; }
}

/* Phones (W · Author page · mobile) */
@media (max-width: 760px) {
  /* Initials beside the eyebrow and name; credit, bio and note full width under them */
  .d2-whead { display: grid; grid-template-columns: 56px minmax(0, 1fr); align-items: center; gap: 12px 14px; padding: 20px 16px 16px; }
  .d2-whead__avatar { grid-row: 1 / span 2; width: 56px; height: 56px; font-size: 20px; }
  .d2-whead__text { display: contents; }
  .d2-whead__eyebrow { grid-column: 2; grid-row: 1; align-self: end; margin-bottom: -6px; font-size: 10px; line-height: 13px; letter-spacing: 1.4px; }
  .d2-whead__title { grid-column: 2; grid-row: 2; align-self: start; font-size: 36px; line-height: 36px; letter-spacing: -0.4px; }
  .d2-whead__cred, .d2-whead__bio, .d2-wtodo { grid-column: 1 / -1; }
  .d2-whead__bio { font-size: 15px; line-height: 23px; }
  .d2-wtodo { font-size: 12px; line-height: 17px; padding: 10px 12px; }
  .d2-wlatest { padding: 8px 16px 28px; }
  .d2-wlatest .d2-olead { flex-direction: column; }
  .d2-wlatest .d2-olead__img { width: 100%; height: 200px; min-height: 0; }
  .d2-wall { gap: 20px; padding: 0 16px 28px; }
  .d2-wall__title { font-size: 24px; line-height: 28px; }
  .d2-wall__meta { font-size: 10px; line-height: 13px; }
  .d2-wfilter { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .d2-wchip { flex: none; height: 31px; padding: 7px 12px; }
  .d2-wgrid, .d2-wgrid--2 { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .d2-wcard a { gap: 8px; }
  .d2-wcard__img, .d2-wgrid--2 .d2-wcard__img { aspect-ratio: 358 / 190; border-radius: 6px; }
  .d2-wcard__title { font-size: 21px; line-height: 25px; }
  .d2-wcard__dek { font-size: 13px; line-height: 19px; }
  .d2-wcol { padding: 0 16px 24px; }
  .d2-wcol .d2-onews__panel { padding: 20px; }
}
