/* Thinking. Desktop: one screen, newsroom-dense, but every zone owns one question a visitor
   has in their first three seconds. The lead: one pinned essay (best, not newest — is he good?),
   unlabeled, its size says it. "New": the newest pieces across every medium, dated (is he active?). "Watch": the
   newest video (face and voice). "Lately": short takes from X and LinkedIn (what's on his mind
   this week). "More to read": the back catalogue. Labels name the job, not the contents, and
   there are only two text treatments: long-form (headline weight) and short-form (quiet).
   The type tabs (Essays, Notes, …) are plain scrolling lists with a search box; the tabs are the filters.
   Phones: a scrolling front page in the same zones, sticky tabs, posts as swipeable cards. */
.subnav { display: flex; align-items: baseline; gap: 24px; padding-bottom: 20px; font-size: 15px; color: var(--muted); flex-wrap: wrap; }
.subnav .tabs { display: flex; align-items: baseline; gap: 24px; flex-wrap: wrap; }
.subnav a { display: inline-block; padding: 12px 0; margin: -12px 0; }
.subnav a:hover { color: var(--ink); }
.subnav a[aria-current] { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; }
.subnav .n { font: 11px var(--mono); margin-left: 3px; vertical-align: 1px; }
/* search: a magnifier at the start of the tab row; click and a field unfolds beside it, pushing the tabs right */
.subnav { align-items: center; }
.sbtn { display: grid; place-items: center; width: 44px; height: 44px; flex: 0 0 44px; margin: -12px -14px -12px -12px; padding: 0; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.sbtn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.sbtn svg { width: 15px; height: 15px; display: block; }
.sbtn:hover, .subnav.searching .sbtn { color: var(--ink); }
.search { width: 0; overflow: hidden; transition: width .35s cubic-bezier(.2,.7,.2,1), margin .35s; margin-right: -24px; }
.subnav.searching .search { width: 220px; margin-right: 0; }
.search input { width: 100%; font: inherit; font-size: 15px; color: var(--ink); background: transparent; border: 0; border-bottom: 1px solid var(--line); padding: 2px 0 4px; outline: 0; }
.search input::placeholder { color: var(--muted); }
.search input:focus { border-bottom-color: var(--ink); }
.search input::-webkit-search-cancel-button, .search input::-webkit-search-decoration { -webkit-appearance: none; display: none; }
.view.open { flex: none; overflow: visible; padding-bottom: 64px; }   /* type tabs scroll; the front page stays one screen */
.page:has(.view.open) { height: auto; min-height: calc(100svh + 40px); }   /* a short list still fills screen one; the footer waits below the fold */
.empty { font-size: 15px; color: var(--muted); }

.view { flex: 1; min-height: 0; overflow: hidden; padding: 20px 0 24px; }   /* a breath between the tab row and the page */

/* the type, in ink; the date, in grey */
.k b { font-weight: 500; color: var(--ink); }
.t { font-weight: 600; letter-spacing: var(--tight); line-height: 1.22; }
a:hover .t { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.dek { font-size: 15px; color: var(--muted); line-height: 1.45; }
.thumb { position: relative; overflow: hidden; background: var(--img); }
.thumb .play { position: absolute; left: 8px; bottom: 8px; width: 26px; height: 26px; border-radius: 50%; background: rgba(255,255,255,.92); color: #111; font-size: 10px; display: grid; place-items: center; }
.cut { display: none !important; }

/* zone header: a short label on a thin rule, with a way to see everything */
.zh { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border-top: 1px solid var(--ink); padding-top: 8px; margin-bottom: 14px; }
.zh span { font-size: 13px; font-weight: 600; letter-spacing: .01em; }
.zh em { font-style: normal; font-size: 13px; color: var(--muted); }

/* All: front page */
.front { height: 100%; display: grid; grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr); gap: 40px; }
.main { min-height: 0; display: flex; flex-direction: column; gap: 28px; }
.lead { flex: none; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 32px; }   /* sized by its photo; spare room stays empty rather than stretching anything */
.lead .text { display: flex; flex-direction: column; gap: 10px; min-height: 0; overflow: hidden; }
.lead .t { font-size: clamp(24px, 2.2vw, 30px); line-height: 1.12; }
.lead > a:last-child { min-height: 0; }
.lead .thumb { aspect-ratio: 4 / 5; max-height: 46vh; }   /* short screens: a shorter crop, so "More to read" keeps its rows */
.new { margin-top: 22px; flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; }
.new .list { min-height: 0; display: flex; flex-direction: column; }
.new .list a { display: block; padding: 7px 0; }
.new .list a:first-child { padding-top: 0; }
.lead .new .t { font-size: 16px; line-height: 1.25; }
.front-more { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 40px; }
.mi { display: block; padding: 7px 0; }
.mi .thumb { display: none; }
.mi:nth-child(-n+2) { padding-top: 0; }
.mi .t { font-size: 16px; }
.new .t, .mi .t { font-weight: 500; }
.when { font: 12px var(--mono); letter-spacing: .02em; color: var(--muted); margin-left: 10px; white-space: nowrap; }
.rail { min-height: 0; display: flex; flex-direction: column; overflow: hidden; border-left: 1px solid var(--line); padding-left: 32px; }
.feature { display: flex; flex-direction: column; gap: 10px; margin-bottom: 26px; }
.feature .thumb { aspect-ratio: 16 / 10; }
.feature .t { font-size: 17.5px; }
/* short-form (Lately): the quiet treatment — smaller, grey, regular weight, the network in ink.
   Long-form keeps the headline weight, so the two kinds read apart at a glance. */
.plist { display: flex; flex-direction: column; min-height: 0; }
.post { display: flex; flex-direction: column; gap: 3px; padding: 9px 0; }
.plist .post:first-child { padding-top: 0; }
.post p:not(.k) { font-size: 14px; line-height: 1.45; color: var(--muted); }
.post:hover p:not(.k) { color: var(--ink); }

/* type indexes: a newspaper section page. One column, newest first, each story a ruled row:
   headline and summary on the left, a 3:2 thumbnail on the right (NYT section pages). */
.grid-list { display: flex; flex-direction: column; max-width: 820px; }
.li { display: grid; grid-template-columns: minmax(0, 1fr) 205px; gap: 32px; align-items: start; padding: 22px 0; border-bottom: 1px solid var(--line); }
.li.no-thumb { grid-template-columns: minmax(0, 1fr); }
.li:first-child { padding-top: 4px; }
.li .thumb { aspect-ratio: 3 / 2; }
.li .t { font-size: 21px; margin: 5px 0 6px; }
.li .dek { font-size: 16px; }
.li.post-row { display: block; }   /* a matching post in the "all" search stream */
/* videos: a channel page. The featured one first, then the grid. */
.vfeat { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 32px; align-items: center; padding-bottom: 28px; margin-bottom: 28px; border-bottom: 1px solid var(--line); }
.vfeat .thumb { aspect-ratio: 16 / 9; }
.vfeat .t { font-size: 24px; margin: 8px 0 10px; }
.vfeat .dek { font-size: 16px; }
.dur { position: absolute; right: 8px; bottom: 8px; padding: 2px 5px; border-radius: 3px; background: rgba(0,0,0,.78); color: #fff; font: 11px var(--mono); letter-spacing: .02em; }
.grid-video { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 20px; align-content: start; }
@media (max-width: 1100px) { .grid-video { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.vi { display: flex; flex-direction: column; gap: 0; }
.vi .thumb { aspect-ratio: 16 / 9; }
.vi .t { font-size: 15.5px; margin-top: 9px; line-height: 1.3; }
.vi .vm { margin-top: 4px; font-size: 13px; color: var(--muted); }
.grid-post { display: flex; flex-direction: column; max-width: 680px; }
.grid-post .post { padding: 16px 0; border-bottom: 1px solid var(--line); }
.grid-post .post:first-child { padding-top: 4px; }
.grid-post .post p:not(.k) { font-size: 17px; color: var(--ink); }
.quote { font-size: 20px; font-weight: 500; letter-spacing: var(--tight); line-height: 1.3; }

@media (max-width: 900px) {
  .view { overflow: visible; }

  /* phones: the open field takes the row and the tabs step aside until it closes */
  .subnav { flex-wrap: nowrap; align-items: center; }
  .search { flex: 0 0 auto; }
  .subnav.searching .search { flex: 1 1 auto; width: auto; }
  .subnav.searching .tabs { display: none; }
  .search input { font-size: 16px; }   /* 16px so iOS doesn't zoom the field */
  /* tabs stay reachable while you scroll, and fade at the edge to show there's more */
  .subnav { position: sticky; top: 0; z-index: 5; background: var(--paper); row-gap: 14px; padding: 14px 0; }
  .subnav .tabs { flex: 1 1 auto; min-width: 0; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; gap: 22px;
                  margin: 0 calc(-1 * var(--gutter)) 0 0; padding: 0 var(--gutter) 0 0;
                  -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
  .subnav .tabs::-webkit-scrollbar { display: none; }
  .subnav a { flex: none; }

  /* NYT mobile: edge-to-edge lead photo, headline beneath, then full-width rows split by hairlines */
  .front { display: flex; flex-direction: column; gap: 28px; height: auto; }
  .main { gap: 28px; }
  .lead { display: flex; flex-direction: column; gap: 14px; min-height: 0; }
  .lead > a:last-child { order: -1; margin: 0 calc(-1 * var(--gutter)); }
  .lead .thumb { height: auto; aspect-ratio: 3 / 2; }
  .lead .t { font-size: 26px; line-height: 1.15; }
  .lead .text { padding-bottom: 14px; border-bottom: 1px solid var(--line); }
  .lead .new .t { font-size: 16.5px; }
  .lead .text, .new, .new .list { overflow: visible; }
  .new { margin-top: 26px; }
  .front-more { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .front-more .mi { display: grid; grid-template-columns: minmax(0, 1fr) 84px; gap: 16px; align-items: start; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .front-more .mi:nth-child(-n+2) { padding-top: 14px; }
  .front-more .mi:first-child { padding-top: 0; }
  .front-more .mi .thumb { display: block; aspect-ratio: 1 / 1; }
  .front-more .mi .t { font-size: 17px; }
  .rail { border-left: 0; padding-left: 0; overflow: visible; }
  .feature { margin-bottom: 40px; }
  /* posts: a plain list with hairlines, like everything else on the page */
  .plist .post:nth-child(n+4) { display: none; }
  .feature .t { font-size: 20px; }
  .feature .thumb { margin: 0 calc(-1 * var(--gutter)); aspect-ratio: 16 / 9; }
  .li { grid-template-columns: minmax(0, 1fr) 96px; gap: 16px; padding: 16px 0; }
  .li .thumb { aspect-ratio: 1 / 1; }
  .li .t { font-size: 18px; }
  .li .dek { font-size: 15px; }
  .grid-video { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; }
  .vfeat { grid-template-columns: minmax(0, 1fr); gap: 12px; padding-bottom: 20px; margin-bottom: 20px; }
  .vfeat .thumb { margin: 0 calc(-1 * var(--gutter)); }
  .vfeat .t { font-size: 20px; }
}
.media-empty { font-size: 14px; line-height: 1.5; color: var(--muted); margin-bottom: 26px; }
.media-empty a { text-decoration: underline; text-underline-offset: 3px; }
