/* Work owns a normal document flow; shared title/nav/button rules stay in theme.css. */
body.work-page {
  --work-dial-column: clamp(270px, 20vw, 300px);
  --work-arc-width: var(--work-dial-column);
  color: #111;
  display: flow-root;
  min-height: 100vh;
  overflow-x: clip;
}
body.work-page .page-title { margin: 0; }
body.work-page .work-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--work-dial-column);
  column-gap: 32px;
  row-gap: 30px;
  margin: 80px 1.95% 32px;
}
body.work-page .work-intro-block { grid-column: 1; grid-row: 1; min-width: 0; }
body.work-page .work-intro {
  margin: 0;
  font-size: clamp(13px, 1vw, 16px);
  line-height: 1.55;
  color: #575757;
}
/* Match the homepage .tele rest/hover chips, without expansion marks. */
body.work-page .work-phrase {
  display: inline;
  appearance: none;
  font: inherit;
  line-height: inherit;
  color: inherit;
  border: 0;
  margin: 0;
  padding: 0 .2em;
  border-radius: 2px;
  background: rgba(59, 29, 255, .13);
  text-decoration: none;
  transition: color 200ms, background-color 200ms;
  cursor: pointer;
}
body.work-page .work-phrase:hover,
body.work-page .work-phrase:focus-visible,
body.work-page .work-phrase[aria-pressed="true"] { background: rgba(59, 29, 255, .22); color: #3B1DFF; }
body.work-page .work-status { margin: 20px 0 0; font-size: 12px; line-height: 1.6; color: #575757; }
body.work-page #work-reset { border: 0; padding: 0; background: none; font: inherit; color: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
body.work-page #work-reset:hover { color: #3B1DFF; }
body.work-page .work-field-content { grid-column: 1; grid-row: 2; min-width: 0; }
body.work-page .work-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; align-items: start; }
body.work-page .work-tile {
  display: block;
  min-width: 0;
  color: #111;
  text-decoration: none;
  transition: opacity 300ms, filter 300ms;
}
body.work-page .work-tile[data-size="L"] { grid-column: span 2; }
body.work-page .work-tile.is-dimmed { opacity: .15; filter: grayscale(100%); }
body.work-page .work-media {
  width: 100%;
  aspect-ratio: 16 / 9;
  box-sizing: border-box;
  border-radius: 5px;
  overflow: hidden;
}
body.work-page .work-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* S tiles use the same 16:9 image crop in a shorter media window. */
body.work-page .work-tile[data-size="S"] .work-media { aspect-ratio: 16 / 7; }
body.work-page .work-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  border: 1px dashed #c9c6bf;
  min-height: 72px;
  font-size: 11px;
  line-height: 1.6;
  text-align: center;
  color: #999;
}
body.work-page .work-tile-title { margin: 10px 0 0; font-size: 13px; font-weight: 400; line-height: 1.5; overflow-wrap: anywhere; }
body.work-page .work-tile-meta { margin: 4px 0 0; font-size: 11px; line-height: 1.6; color: #575757; }
body.work-page a.work-tile:hover .work-tile-title { color: #3B1DFF; }
body.work-page .work-lab { margin-top: 48px; }
body.work-page .work-lab h2 { margin: 0 0 20px; font: 400 12px 'Roboto Mono', monospace; text-transform: uppercase; letter-spacing: .08em; color: #575757; }
body.work-page .work-lab-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
body.work-page .work-dial-column { grid-column: 2; grid-row: 1 / 3; min-width: 0; padding-top: max(0px, calc(15vh - 80px)); }
body.work-page .work-dial-sticky { position: sticky; top: 15vh; height: 70vh; }
body.work-page .work-dial { position: absolute; right: 0; top: 0; width: var(--work-arc-width); height: 100%; }
body.work-page .work-arc { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
body.work-page .work-arc path { fill: none; stroke: #c9c6bf; stroke-width: 1; vector-effect: non-scaling-stroke; }
body.work-page .work-pointer { position: absolute; top: 50%; left: -12px; width: 24px; height: 2px; background: #3B1DFF; }
body.work-page .work-chapter {
  position: absolute;
  top: 50%;
  left: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  border: 0;
  background: none;
  color: #575757;
  font: 400 12px/1.5 'Roboto Mono', monospace;
  text-align: left;
  cursor: pointer;
  box-sizing: border-box;
  will-change: transform;
}
body.work-page .work-chapter::before { content: ''; flex: 0 0 14px; height: 1px; background: #c9c6bf; }
body.work-page .work-chapter[data-weight="fellowship"] { font-size: 11px; color: #999; }
body.work-page .work-chapter[data-weight="fellowship"]::before { flex-basis: 7px; }
body.work-page .work-chapter[aria-selected="true"] { font-size: 13px; color: #3B1DFF; }
body.work-page .work-chapter[aria-selected="true"]::before { background: #3B1DFF; }
body.work-page .work-caption { position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: calc(100% - var(--work-arc-width) - 24px); max-width: 220px; }
body.work-page .work-caption h2 { font: 400 13px/1.5 'Roboto Mono', monospace; margin: 0; color: #111; }
body.work-page .work-caption .work-years { margin: 6px 0 16px; font-size: 11px; color: #575757; }
body.work-page .work-caption ul { padding: 0; margin: 0; list-style: none; }
body.work-page .work-caption li { position: relative; padding-left: 1.25em; margin-top: 10px; font-size: 12px; line-height: 1.6; color: #575757; }
body.work-page .work-caption li::before { content: '–'; position: absolute; left: 0; }
body.work-page .work-caption.is-entering { animation: work-caption-in 200ms ease-out; }
@keyframes work-caption-in { from { opacity: 0; } to { opacity: 1; } }
body.work-page :is(.work-phrase, #work-reset, .work-dial, .work-tile):focus-visible { outline: 2px solid #3B1DFF; outline-offset: 4px; }
@media (min-width: 769px) and (max-width: 1199px) {
  body.work-page .work-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
body.work-page :is(.work-scale-label, .work-major-tick, .work-minor-tick, .work-watermark, .work-leader) { display: none; }
/* Desktop: a fixed scale, a moving needle, and an independent caption card. */
@media (min-width: 769px) {
  body.work-page .work-main { margin-right: 0; overflow-x: clip; }
  body.work-page .work-field-content { margin-top: var(--work-field-offset, 0px); width: var(--work-field-width, 100%); }
  body.work-page .work-media { position: relative; }
  body.work-page .work-media img { position: absolute; inset: 0; }
  body.work-page .work-placeholder { min-height: 0; }
  body.work-page [data-id="paper"] img { object-position: 65% 50%; }
  body.work-page .work-dial-column { padding-top: var(--work-dial-offset, 110px); }
  body.work-page .work-dial-sticky {
    top: var(--work-dial-top, 180px);
    z-index: 100;
    height: var(--work-dial-height, 224px);
  }
  body.work-page .work-arc {
    inset: 0 0 auto auto;
    width: var(--work-radius, 112px);
    height: calc(2 * var(--work-radius, 112px));
  }
  body.work-page .work-pointer {
    left: 100%;
    width: calc(var(--work-radius, 112px) - 14px);
    height: 1.5px;
    margin-top: -.75px;
    transform-origin: 0 50%;
    transform: rotate(-100deg);
    transition: transform 380ms cubic-bezier(0.34, 1.2, 0.64, 1);
    z-index: 2;
    pointer-events: none;
  }
  body.work-page .work-dial::after {
    content: '';
    position: absolute;
    right: -1.5px;
    top: calc(50% - 1.5px);
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #3B1DFF;
    pointer-events: none;
    z-index: 3;
  }
  body.work-page .work-chapter,
  body.work-page .work-chapter[data-weight="fellowship"] {
    display: block;
    width: max-content;
    padding: 0;
    transform: translate(-100%, -50%);
    height: 20px;
    font: 400 13px/20px 'Roboto Mono', monospace;
    text-align: right;
    white-space: nowrap;
    will-change: auto;
  }
  body.work-page .work-chapter::before,
  body.work-page .work-chip-label { display: none; }
  body.work-page .work-scale-label { display: block; white-space: pre; font: 400 13px/20px 'Roboto Mono', monospace; }
  body.work-page .work-scale-years { display: inline-block; vertical-align: top; width: 7ch; text-align: left; font: 400 13px/20px 'Roboto Mono', monospace; font-variant-numeric: tabular-nums; color: #999; }
  body.work-page .work-scale-name { display: inline-block; vertical-align: top; font: 400 13px/20px 'Roboto Mono', monospace; color: #575757; transition: color 150ms; }
  body.work-page [data-weight="fellowship"] .work-scale-name { color: #999; }
  body.work-page .work-scale-fellowship { display: inline-block; vertical-align: top; font: 400 13px/20px 'Roboto Mono', monospace; color: #aaa; }
  body.work-page .work-leader {
    display: block;
    position: absolute;
    height: .75px;
    background: #d8d5ce;
    transform: translateY(-50%);
    pointer-events: none;
  }
  body.work-page .work-chapter[aria-selected="true"] + .work-leader { height: 1px; background: #3B1DFF; }
  body.work-page [aria-selected="true"] .work-scale-name { color: #3B1DFF; }
  body.work-page .work-chapter:hover .work-scale-name { color: #111; }
  body.work-page :is(.work-major-tick, .work-minor-tick) {
    display: block;
    position: absolute;
    transform-origin: 0 50%;
    pointer-events: none;
    z-index: 1;
  }
  body.work-page .work-major-tick { width: 11px; height: 1px; margin-top: -.5px; background: #8a8a8a; transition: width 150ms; }
  body.work-page .work-major-tick[data-weight="fellowship"] { width: 7px; }
  body.work-page .work-major-tick.is-hovered { width: 14px; }
  body.work-page .work-major-tick[data-weight="fellowship"].is-hovered { width: 10px; }
  body.work-page .work-minor-tick { width: 4px; height: .75px; margin-top: -.375px; background: #d8d5ce; }
  body.work-page .work-watermark {
    display: block;
    position: absolute;
    right: 0;
    top: 50%;
    width: var(--work-radius, 112px);
    height: 40px;
    transform: translateY(-50%);
    font: 400 40px/1 'Roboto Mono', monospace;
    color: #575757;
    opacity: .08;
    pointer-events: none;
    text-align: center;
    z-index: 0;
  }
  body.work-page .work-watermark > span { display: block; }
  body.work-page .work-watermark > span:first-child { position: absolute; inset: 0; opacity: 0; }
  body.work-page .work-caption {
    position: fixed;
    top: auto;
    left: auto;
    right: 24px;
    bottom: 24px;
    width: 300px;
    max-width: none;
    box-sizing: border-box;
    transform: none;
    background: #FAF9F6;
    border: 1px solid #e3e0d8;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .08);
    padding: 16px 18px;
    z-index: 100;
  }
  body.work-page .work-caption h2 { padding-right: 20px; }
  body.work-page .work-caption li { margin-top: .4em; }
  body.work-page .work-caption.is-entering { animation: work-card-in 200ms ease-out; }
  body.work-page .work-caption.is-leaving { animation: work-card-out 200ms ease-out forwards; pointer-events: none; }
  body.work-page .work-caption-close {
    position: absolute;
    top: 8px;
    right: 10px;
    padding: 2px 6px;
    border: 0;
    background: none;
    color: #575757;
    font: 20px/1 'Roboto Mono', monospace;
    cursor: pointer;
  }
  body.work-page .work-caption-close:hover { color: #3B1DFF; }
  body.work-page .work-caption-close:focus-visible { outline: 2px solid #3B1DFF; outline-offset: 2px; }
}
@keyframes work-card-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes work-card-out { from { opacity: 1; } to { opacity: 0; } }
@media (min-width: 1600px) {
  body.work-page .work-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  body.work-page .work-main { display: block; margin: 52px 17.6px 24px; }
  body.work-page .work-intro { font-size: 11px; line-height: 1.55; }
  body.work-page .work-status { margin-top: 16px; }
  body.work-page .work-dial-column,
  body.work-page .work-dial-sticky { display: contents; }
  body.work-page .work-dial {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: baseline;
    gap: 22px;
    width: 100%;
    height: auto;
    margin: 20px 0 24px;
    padding: 12px 0;
    background: #FAF9F6;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
  }
  body.work-page .work-arc,
  body.work-page .work-pointer { display: none; }
  body.work-page .work-chapter {
    position: static;
    flex: 0 0 auto;
    width: auto !important;
    transform: none !important;
    opacity: 1 !important;
    white-space: nowrap;
    padding: 4px 0;
    border-bottom: 1px solid transparent;
    will-change: auto;
  }
  body.work-page .work-chapter::before { display: none; }
  body.work-page .work-chapter[aria-selected="true"] { border-bottom-color: #3B1DFF; }
  body.work-page .work-caption-close { display: none; }
  body.work-page .work-caption { position: static; transform: none; width: auto; max-width: none; margin: 0 0 28px; }
  body.work-page .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.work-page .work-lab-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  body.work-page .work-placeholder { padding: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  body.work-page .work-tile,
  body.work-page .work-phrase,
  body.work-page .work-pointer,
  body.work-page .work-scale-name,
  body.work-page .work-major-tick { transition: none; }
  body.work-page .work-caption.is-entering,
  body.work-page .work-caption.is-leaving { animation: none; }
}
