:root {
  --bg: #f3f0e8;
  --ink: #1c1c1e;
  --muted: #6e6e73;
  --accent: #2d6cdf;
  --violet: #7b5cfa;
  --accent-soft: rgba(45, 108, 223, 0.12);
  --violet-soft: rgba(123, 92, 250, 0.12);
  --border: rgba(28, 28, 30, 0.1);
  --radius-md: 18px;
  --radius-sm: 12px;
  --sans: "Inter", system-ui, sans-serif;
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg);
  background-image:
    radial-gradient(rgba(28, 28, 30, 0.11) 0.7px, transparent 0.7px),
    radial-gradient(720px 460px at 108% -8%, rgba(45, 108, 223, 0.2), transparent 58%),
    radial-gradient(560px 420px at -8% 108%, rgba(123, 92, 250, 0.16), transparent 56%);
  background-size: 20px 20px, auto, auto;
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

button {
  font-family: inherit;
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
}

a {
  color: var(--accent);
  text-decoration: none;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 80;
  background: var(--ink);
  color: var(--bg);
  padding: 0.7rem 0.9rem;
  text-decoration: none;
  border-radius: 8px;
}

.skip:focus {
  top: 0.8rem;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 0;
}

.wordmark {
  display: inline-flex;
  align-items: baseline;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-decoration: none;
  padding: 8px 0;
}

.wordmark[hidden] {
  display: none;
}

.gx {
  color: var(--violet);
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .gx,
  .gx .glyph {
    background: linear-gradient(105deg, #2d6cdf 0%, #7b5cfa 80%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

.nav-track {
  position: relative;
  box-sizing: border-box;
  height: var(--bar-h);
  display: flex;
  align-items: stretch;
  gap: 2px;
  margin-left: auto;
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px;
  box-shadow: 0 8px 20px rgba(28, 28, 30, 0.08), 0 1px 4px rgba(28, 28, 30, 0.05);
}

.nav-thumb {
  position: absolute;
  top: 4px;
  left: 4px;
  height: calc(100% - 8px);
  width: 72px;
  background: #fff;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(28, 28, 30, 0.12);
  transition:
    transform 0.28s cubic-bezier(0.4, 0, 0.2, 1),
    width 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link {
  position: relative;
  z-index: 1;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--muted);
  display: flex;
  align-items: center;
  padding: 0 18px;
  border-radius: 999px;
  transition: color 0.2s ease;
}

.nav-link.active {
  color: var(--ink);
}

main {
  width: min(920px, calc(100% - 32px));
  min-width: 0;
  margin: 0 auto;
}

.page {
  display: none;
  padding: 28px 0 12px;
}

.page.active {
  display: block;
  animation: rise 0.28s ease;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.identity {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 36px;
}

.avatar-ring {
  flex: none;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  overflow: hidden;
}

.avatar-ring img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.follow {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1;
  color: var(--ink);
}

.follow-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 0;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1;
}

.follow-sep {
  color: var(--muted);
  font-size: 0.85em;
  font-weight: 500;
  line-height: 1;
}

.follow-sep[hidden],
.follower-count[hidden] {
  display: none;
}

.follower-count {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1;
  color: var(--muted);
}

.follow:hover {
  color: var(--accent);
}

.x-mark {
  width: 0.88em;
  height: 0.88em;
  display: block;
  flex: none;
  fill: currentColor;
}

.handle {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
}

.about-card {
  padding: 20px 24px 16px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 10px 24px rgba(28, 28, 30, 0.07);
}

.lede {
  margin: 0 0 16px;
  font-size: clamp(1.7rem, 3.4vw, 2.3rem);
  font-weight: 700;
  letter-spacing: -0.045em;
}

.about {
  max-width: 38rem;
}

.about p {
  margin: 0 0 14px;
  font-size: 1.06rem;
  line-height: 1.65;
}

.about p:last-child {
  margin-bottom: 0;
}

.about-label {
  display: block;
  margin: 0 0 12px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.press-card {
  margin-top: 16px;
  padding: 22px 0 32px;
  overflow: hidden;
}

.press-label {
  display: block;
  margin: 0 24px 14px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.press-marquee {
  overflow: hidden;
  width: 100%;
  mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
}

.press-track {
  display: flex;
  align-items: center;
  width: max-content;
  animation: press-scroll 42s linear infinite;
}

.press-marquee:hover .press-track {
  animation-play-state: paused;
}

.press-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 128px;
  height: 36px;
  margin: 0 18px;
  flex: none;
}

.press-chip img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: brightness(0);
  opacity: 0.72;
}

@keyframes press-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .press-track { animation: none; }
}

.glyph {
  display: inline-block;
  min-width: 0.72em;
  text-align: center;
}

.glyph.is-rolling {
  opacity: 0.55;
}

@media (prefers-reduced-motion: reduce) {
  .glyph.is-rolling {
    opacity: 1;
  }
}

.link-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.link-logo {
  flex: none;
  width: 2.75rem;
  height: 2.75rem;
}

.link-tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.link-row.link-tile {
  flex-direction: column;
  align-items: center;
  justify-content: flex-start; /* icons line up even if a name wraps */
  gap: 10px;
  padding: 42px 16px 34px;
  text-align: center;
}

.link-tile .link-logo {
  width: 3.5rem;
  height: 3.5rem;
  margin-bottom: 0;
}

.link-tile:first-child .link-logo {
  box-sizing: border-box;
  padding: 0.22rem; /* the X glyph fills its whole box; this makes it match the other two */
}

.link-tile .link-name {
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.link-tile .link-meta {
  font-size: 0.82rem;
  line-height: 1.3;
}

.link-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 10px 24px rgba(28, 28, 30, 0.05);
  color: var(--ink);
  text-decoration: none;
}

.link-row:hover {
  color: var(--accent);
}

.link-name {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-size: 1.05rem;
  font-weight: 700;
}

.link-meta {
  color: var(--muted);
  font-size: 0.92rem;
}

.concept-card.featured {
  margin-bottom: 28px;
}

.section-head {
  margin-bottom: 22px;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.2rem);
  letter-spacing: -0.04em;
}

.work-grid,
.posts-feed {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.posts-bento {
  align-items: stretch;
}

.more-card {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 148px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 10px 24px rgba(28, 28, 30, 0.07);
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 650;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.more-card:hover {
  color: var(--accent);
}

.masonry-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.concept-card,
.post {
  min-width: 0;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: 0 10px 24px rgba(28, 28, 30, 0.07);
  backdrop-filter: blur(16px);
}

.concept-card {
  display: flex;
  flex-direction: column;
  padding: 14px;
}

.concept-card.featured {
  grid-column: 1 / -1;
}

.tag {
  display: inline-flex;
  align-self: flex-start;
  margin-bottom: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
}

.tag.violet {
  color: var(--violet);
  background: var(--violet-soft);
}

.shot {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin: 0 0 12px;
  padding: 0;
  border-radius: 16px;
  overflow: hidden;
  background: #07070a;
  line-height: 0;
}

.shot img {
  width: 100%;
  height: auto;
  transition: transform 0.35s ease;
}

.concept-card:hover .shot img {
  transform: scale(1.012);
}

.concept-card h2,
.concept-card h3 {
  margin: 0 0 4px;
  font-size: 1.08rem;
  letter-spacing: -0.03em;
}

.concept-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.post {
  padding: 20px 22px;
  overflow: hidden;
}

.post-date {
  margin-bottom: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

.post-text {
  margin: 0 0 12px;
  white-space: pre-line;
}

.post-imgs,
.post-videos,
.photo-rail,
.quote-card {
  min-width: 0;
  max-width: 100%;
}

.post-imgs,
.post-videos {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.post-imgs img,
.photo-rail img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  min-width: 0;
  border-radius: var(--radius-sm);
  background: #111;
}

.player {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: #141416;
  line-height: 0;
}

.player video {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  min-width: 0;
  border-radius: 0;
  background: #141416;
}

.player:not(.is-playing)::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.38), transparent 42%);
  pointer-events: none;
}

.player-play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: #141416;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

.player-play svg {
  width: 22px;
  height: 22px;
  margin-left: 3px;
  fill: currentColor;
}

.photo-rail {
  position: relative;
  overflow: hidden;
}

.photo-nav {
  position: absolute;
  top: 50%;
  width: 36px;
  height: 36px;
  transform: translateY(-50%);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font-size: 1.5rem;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(28, 28, 30, 0.18);
}

.photo-nav.prev { left: 8px; }
.photo-nav.next { right: 8px; }

.photo-count {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(20, 20, 22, 0.72);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
}

.quote-card {
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.5);
}

.quote-author {
  margin-bottom: 4px;
  font-size: 0.82rem;
  font-weight: 700;
}

.quote-text {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.92rem;
  white-space: pre-line;
}

.quote-card .post-imgs,
.quote-card .post-videos {
  margin-bottom: 0;
}

.posts-status {
  margin: 0;
  color: var(--muted);
}

.post-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}

.post-link:hover {
  color: var(--accent);
}

.site-footer {
  width: min(920px, calc(100% - 32px));
  margin: 28px auto 0;
  padding: 0 0 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
  margin: 0;
  font-size: 0.88rem;
  font-weight: 600;
}

.footer-links a {
  color: var(--muted);
}

.footer-links a:hover {
  color: var(--accent);
}

.grok-credit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
}

.grok-mark {
  width: 16px;
  height: 16px;
  display: block;
  flex: none;
}

@media (max-width: 760px) {
  .nav-link {
    padding: 0 14px;
  }

  .topbar {
    flex-wrap: wrap;
    padding-top: 16px;
  }

  /* Phones: "Follow me on X" runs the full width, the other two share the row under it. */
  .link-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .link-tiles .link-tile:first-child {
    grid-column: 1 / -1;
  }

  .link-row.link-tile {
    padding: 34px 10px 26px;
  }

  .link-tile .link-logo {
    width: 3rem;
    height: 3rem;
  }

  .link-tile .link-name {
    font-size: 0.95rem;
    white-space: nowrap;
  }

}

@media (prefers-reduced-motion: reduce) {
  .page.active,
  .nav-thumb,
  .shot img {
    animation: none;
    transition: none;
  }

  .concept-card:hover .shot img {
    transform: none;
  }
}

/* ---------- Work: tag rows, article cards, reader ---------- */

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.tags .tag {
  margin-bottom: 0;
}

.read-link {
  align-self: flex-start;
  margin-top: 10px;
}

.shot.is-openable {
  cursor: pointer;
}

.reader {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 70;
  padding: 48px 20px;
  overflow: hidden; /* the backdrop itself never scrolls */
  background: rgba(16, 16, 18, 0.78);
  backdrop-filter: blur(8px);
}

.reader.open {
  display: flex;
  align-items: center;
  justify-content: center;
}

.reader-panel {
  --pad-x: 36px;
  display: flex;
  flex-direction: column;
  width: min(720px, 100%);
  max-height: 100%;
  overflow: hidden; /* rounded corners clip everything inside */
  border: 1px solid var(--border);
  border-radius: 24px;
  background: #fcfbf8;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.reader-bar {
  flex: none; /* fixed header: it is not part of the scrolling area */
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
  padding: 12px var(--pad-x);
  background: #fcfbf8;
}

.reader-bar .tags {
  margin-bottom: 0;
}

.reader .article-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 0 var(--pad-x) 40px;
}

.reader-close {
  flex: none;
  min-width: 44px;
  min-height: 44px;
  margin-right: -10px;
  border-radius: 50%;
  color: var(--muted);
  font-size: 1.9rem;
  line-height: 1;
}

.reader-close:hover {
  color: var(--ink);
  background: var(--accent-soft);
}

.article-body img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 0 24px;
  border-radius: var(--radius-sm);
  background: #111;
}

.article-body iframe,
.article-body video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  margin: 0 0 24px;
  border: 0;
  border-radius: var(--radius-sm);
  background: #000;
}

.article-body h1,
.article-body .article-title {
  margin: 0 0 20px;
  font-size: clamp(1.65rem, 4vw, 2.15rem);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.04em;
}

.article-body h2 {
  margin: 34px 0 10px;
  font-size: 1.3rem;
  letter-spacing: -0.03em;
}

.article-body h3 {
  margin: 26px 0 8px;
  font-size: 1.08rem;
  letter-spacing: -0.02em;
}

.article-body p,
.article-body li {
  font-size: 1.04rem;
  line-height: 1.7;
}

.article-body p {
  margin: 0 0 14px;
}

.article-body ul,
.article-body ol {
  margin: 0 0 14px;
  padding-left: 1.3em;
}

.article-body li {
  margin-bottom: 6px;
}

.article-body a {
  font-weight: 500;
}

.article-body blockquote {
  margin: 0 0 14px;
  padding: 2px 0 2px 16px;
  border-left: 3px solid var(--accent-soft);
  color: var(--muted);
}

.article-body code {
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(28, 28, 30, 0.06);
  font-size: 0.92em;
}

.article-body hr {
  margin: 28px 0;
  border: 0;
  border-top: 1px solid var(--border);
}

@media (max-width: 760px) {
  .reader {
    padding: 14px 10px;
  }

  .reader-panel {
    --pad-x: 20px;
    border-radius: 20px;
  }
}


/* ---------- Work: type line, type tabs, tag filter, button ---------- */

.work-meta {
  margin-bottom: 10px;
}

.reader-bar .work-meta {
  margin-bottom: 0;
}

.work-meta-sep {
  opacity: 0.45;
}

.work-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.work-toolbar[hidden],
.work-filter[hidden],
.work-filter-menu[hidden],
.work-tab[hidden],
.work-filter-btn[hidden],
.work-filter-count[hidden] {
  display: none;
}

.work-tabs {
  position: relative;
  box-sizing: border-box;
  height: var(--bar-h);
  display: flex;
  align-items: stretch;
  gap: 2px;
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px;
  box-shadow: 0 8px 20px rgba(28, 28, 30, 0.08), 0 1px 4px rgba(28, 28, 30, 0.05);
}

.work-tab-thumb {
  position: absolute;
  top: 4px;
  left: 4px;
  height: calc(100% - 8px);
  width: 0;
  background: #fff;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(28, 28, 30, 0.12);
  transition:
    transform 0.28s cubic-bezier(0.4, 0, 0.2, 1),
    width 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.work-tab {
  position: relative;
  z-index: 1;
  border: 0;
  background: none;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--muted);
  display: flex;
  align-items: center;
  padding: 0 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.2s ease;
}

.work-tab[aria-pressed="true"] {
  color: var(--ink);
}

.work-filter {
  position: relative;
  flex: none;
}

.work-filter-btn {
  position: relative;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  width: var(--bar-h);
  height: var(--bar-h);
  padding: 0;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--border);
  border-radius: 50%;
  box-shadow: 0 8px 20px rgba(28, 28, 30, 0.08), 0 1px 4px rgba(28, 28, 30, 0.05);
  cursor: pointer;
  transition: color 0.2s ease;
}

.work-filter-icon {
  width: 18px;
  height: 18px;
}

.work-filter-btn[aria-expanded="true"],
.work-filter-btn.has-filters {
  color: var(--accent);
}

.work-filter-count {
  position: absolute;
  top: -4px;
  right: -4px;
  display: grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
}

.work-filter-menu {
  position: fixed; /* moved to <body> and positioned by script, so nothing can cover or clip it */
  top: 0;
  left: 0;
  z-index: 90;
  min-width: 220px;
  max-width: min(300px, calc(100vw - 40px));
  max-height: 320px;
  overflow-y: auto;
  padding: 6px;
  background: #fffefb;
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 16px 36px rgba(28, 28, 30, 0.16), 0 2px 8px rgba(28, 28, 30, 0.06);
}

.work-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 12px;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.work-option:hover {
  background: var(--accent-soft);
}

.work-check {
  position: relative;
  flex: none;
  width: 18px;
  height: 18px;
  border: 1.5px solid rgba(28, 28, 30, 0.28);
  border-radius: 6px;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.work-option[aria-checked="true"] .work-check {
  border-color: var(--accent);
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.4l3 3 6-6.6' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px 12px no-repeat;
}

.work-option-count {
  margin-left: auto;
  color: var(--muted);
  font-weight: 500;
}

.work-clear {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 10px 10px 6px;
  border: 0;
  border-top: 1px solid var(--border);
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.work-clear:hover {
  color: var(--accent);
}

.work-tab:focus-visible,
.work-filter-btn:focus-visible,
.work-option:focus-visible,
.work-clear:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (max-width: 760px) {
  .work-tab {
    padding: 0 12px;
  }
}

/* Five tabs plus the filter button: tighten on small phones so nothing overflows */
@media (max-width: 440px) {
  .work-tab {
    padding: 0 8px;
    font-size: 0.8rem;
  }
}

.work-pinned {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 16px;
}

.work-pinned:empty {
  display: none;
}

.work-pinned .shot img {
  max-height: 420px;
  object-fit: cover;
}


/* ---------- Work popup: subtitle line and button row (same for every type) ---------- */

.article-body .work-lead {
  margin: -6px 0 18px;
  color: var(--muted);
  font-size: 1.1rem;
}

.work-actions {
  display: flex;
  margin-top: 28px;
}

.work-actions .read-link {
  margin-top: 0;
}

/* One height for the top nav bar, the Work type bar and the tag filter button. Change it here and all three follow. */
:root {
  --bar-h: 42px;
}

@media (max-width: 360px) {
  .link-tile .link-name {
    white-space: normal;
  }
}
