/* justinchuan.com — hand-written stylesheet */

/* Klim Type Foundry web fonts (licensed): Tiempos Text and Metric */
@font-face { font-family: "Tiempos Text"; src: url("../fonts/TiemposTextWeb-Regular.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Tiempos Text"; src: url("../fonts/TiemposTextWeb-RegularItalic.woff") format("woff"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Tiempos Text"; src: url("../fonts/TiemposTextWeb-Semibold.woff") format("woff"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Metric"; src: url("../fonts/MetricWeb-Regular.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Metric"; src: url("../fonts/MetricWeb-RegularItalic.woff") format("woff"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Metric"; src: url("../fonts/MetricWeb-Medium.woff") format("woff"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Metric"; src: url("../fonts/MetricWeb-Semibold.woff") format("woff"); font-weight: 600; font-style: normal; font-display: swap; }

:root {
  --ink: #1e1e1e;
  --pink: #f386a1;
  --ink-2: #4b4b50;
  --ink-3: #82828a;
  --paper: #f7f6f2;
  --paper-2: #efeee9;
  --line: #dcdbd5;
  --line-dark: #303035;
  --dark: #1e1e1e;
  --dark-text: #e9e8e3;
  --dark-muted: #9c9ca0;

  --serif: "Tiempos Text", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Metric", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  --measure: 60ch;
  --gutter: clamp(20px, 5vw, 64px);
  --max: 1160px;
  --label-col: 220px;
  --col-gap: clamp(28px, 5vw, 72px);
}

*, *::before, *::after { box-sizing: border-box; }
::selection { background: var(--pink); color: var(--ink); }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17.5px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern", "liga", "calt";
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
p a, li a, blockquote a, .lead a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
  transition: text-decoration-color 160ms ease;
}
p a:hover, li a:hover, blockquote a:hover, .lead a:hover { text-decoration-color: transparent; background: var(--pink); box-shadow: 0 0 0 2px var(--pink); box-decoration-break: clone; -webkit-box-decoration-break: clone; }
:focus-visible { outline: 2px solid var(--pink); outline-offset: 4px; border-radius: 0; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* Typography */
h1, h2, h3, .serif { font-family: var(--serif); font-weight: 400; margin: 0; text-wrap: balance; font-feature-settings: "kern", "liga"; }
h1 { font-size: clamp(2.3rem, 4.2vw, 3.3rem); line-height: 1.06; letter-spacing: -0.018em; max-width: 20ch; }
h2 { font-size: clamp(1.75rem, 3vw, 2.35rem); line-height: 1.12; letter-spacing: -0.012em; }
h3 { font-size: clamp(1.3rem, 2vw, 1.5rem); line-height: 1.22; letter-spacing: -0.006em; }
p { margin: 0 0 1.15em; max-width: var(--measure); text-wrap: pretty; }
p:last-child { margin-bottom: 0; }
.lead { font-size: 1.15rem; line-height: 1.5; color: var(--ink-2); max-width: 54ch; }
.muted { color: var(--ink-3); }
.eyebrow {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 14px;
}
ul { padding-left: 1.1em; }
li { margin-bottom: 0.5em; }
li::marker { color: var(--ink-3); }

/* Text button */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 0 4px;
  border-bottom: 1px solid currentColor;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.2;
  transition: opacity 160ms ease;
}
p a.btn, .btn { text-decoration: none; }
.btn svg { width: 12px; height: 12px; }
.btn:hover { background: var(--pink); box-shadow: 0 0 0 3px var(--pink); border-bottom-color: transparent; }

/* Dark band */
.dark { background: var(--dark); color: var(--dark-text); }
.dark .lead { color: #c4c4c0; }
.dark .muted, .dark .eyebrow { color: var(--dark-muted); }

/* Header: fixed, transparent over the hero, paper once scrolled */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 20;
  color: var(--ink);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  transition: background 320ms ease, color 320ms ease, border-color 320ms ease;
}
.site-header.over-hero { border-bottom-color: transparent; }
.site-header .wrap { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 64px; gap: 24px; }
.brand { font-family: var(--serif); font-size: 1.35rem; letter-spacing: -0.01em; justify-self: start; }
.brand:hover { background: var(--pink); box-shadow: 0 0 0 3px var(--pink); }
.site-nav { display: flex; gap: 26px; justify-self: center; }
.site-nav a {
  position: relative;
  font-size: 0.9rem;
  color: inherit;
  opacity: 0.62;
  transition: opacity 160ms ease;
  padding: 4px 0;
}
.site-nav a::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -2px;
  height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: left;
  transition: transform 260ms cubic-bezier(.2,.7,.2,1);
}
.site-nav a:hover, .site-nav a[aria-current="true"] { opacity: 1; }
.site-nav a[aria-current="true"]::after { transform: scaleX(1); }
.site-nav a:hover { background: var(--pink); box-shadow: 0 0 0 3px var(--pink); }
.site-nav a:hover::after { opacity: 0; }
.header-meta {
  justify-self: end;
  margin: 0;
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  opacity: 0.62;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.header-meta .sep { width: 14px; height: 1px; background: currentColor; }
.header-meta time:empty { display: none; }
.header-meta time:empty + .sep, .header-meta time:empty ~ .sep { display: none; }
.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  border: 0; background: none; color: inherit; cursor: pointer;
  padding: 8px; margin-right: -8px;
  justify-self: end;
}
.nav-toggle span { display: block; height: 1px; background: currentColor; margin: 7px 0; transition: transform 200ms ease, opacity 200ms ease; }

/* Hero: full-bleed portrait on the right, statement on the left */
.hero { position: relative; scroll-margin-top: 0; }
.hero-inner {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  max-width: var(--max);
  margin: 0 auto;
}
.hero-copy {
  align-self: center;
  padding: calc(64px + clamp(48px, 7vw, 96px)) var(--col-gap) clamp(48px, 7vw, 96px) var(--gutter);
}
.hero-copy .eyebrow { margin-bottom: 22px; }
.hero h1 { font-size: clamp(2.4rem, 4.2vw, 3.4rem); line-height: 1.05; letter-spacing: -0.02em; max-width: 19ch; margin-bottom: 28px; }
.hero .lead { margin-bottom: 36px; max-width: 46ch; }
.hero-photo { margin: 0; align-self: center; padding: calc(64px + clamp(32px, 5vw, 64px)) var(--gutter) clamp(32px, 5vw, 64px) 0; }
.hero-photo .card {
  position: relative;
  background: var(--paper-2);
  border: 1px solid var(--ink);
  padding: 12px;
  clip-path: polygon(0 0, calc(100% - 30px) 0, 100% 30px, 100% 100%, 0 100%);
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
.hero-photo .card::before {
  content: ""; position: absolute; top: -1px; right: -1px; width: 31px; height: 31px;
  background: linear-gradient(to bottom left, transparent calc(50% - 1px), var(--ink) calc(50% - 1px), var(--ink) calc(50% + 0.5px), transparent calc(50% + 0.5px));
}
.hero-photo img { width: 100%; max-height: min(64vh, 640px); aspect-ratio: 5 / 6; object-fit: cover; object-position: 50% 30%; }
.card-head, .card-foot {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.06em; color: var(--ink-2);
}
.card-head { padding: 2px 2px 10px; }
.card-foot { padding: 10px 2px 2px; color: var(--ink-3); }
.holes { display: inline-flex; gap: 6px; }
.holes i { display: block; width: 6px; height: 12px; border: 1px solid var(--ink-3); }
.holes i.on { background: var(--ink); border-color: var(--ink); }

/* Sections */
.section { padding: clamp(64px, 8vw, 112px) 0; border-top: 1px solid var(--line); scroll-margin-top: 64px; }
.section-head { margin-bottom: clamp(36px, 5vw, 56px); }
.section-head h2 { max-width: 22ch; }
.section-head .lead { margin: 12px 0 0; max-width: none; }

/* Experience */
.roles { border-top: 1px solid var(--line); }
.role {
  display: grid;
  grid-template-columns: var(--label-col) 1fr;
  gap: 16px var(--col-gap);
  padding: 36px 0;
  border-bottom: 1px solid var(--line);
}
.role:last-child { border-bottom: 0; padding-bottom: 0; }
.role-when { font-size: 0.88rem; color: var(--ink-3); line-height: 1.5; padding-top: 5px; }
.role-when strong { display: block; color: var(--ink-2); font-weight: 500; }
.role h3 { margin-bottom: 4px; }
.role .org { font-size: 0.95rem; color: var(--ink-2); margin-bottom: 14px; }
.role .org a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; text-decoration-color: var(--line); }
.role .org a:hover { text-decoration-color: transparent; background: var(--pink); box-shadow: 0 0 0 2px var(--pink); }
.role .nested { margin: 0 0 16px; padding: 0; list-style: none; font-size: 0.88rem; color: var(--ink-2); }
.role .nested li { display: flex; gap: 12px; margin: 0 0 4px; }
.role .nested span:last-child { color: var(--ink-3); }

/* Work */
.work-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px 28px; }
.work-card { display: block; cursor: zoom-in; }
.work-card figure { margin: 0; }
.work-card .thumb { position: relative; overflow: hidden; background: var(--paper-2); aspect-ratio: 1 / 1; border: 1px solid var(--line); }
.work-card img { width: 100%; height: 100%; object-fit: cover; }
.work-card img.dither { position: absolute; inset: 0; image-rendering: pixelated; transition: opacity 260ms ease; }
.work-card:hover img.dither { opacity: 0; }
.work-card .title { display: inline; }
.work-card:hover .title { background: var(--pink); box-shadow: 0 0 0 3px var(--pink); box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.work-card figcaption { padding-top: 14px; }
.work-card .title { font-family: var(--serif); font-size: 1.25rem; line-height: 1.25; letter-spacing: -0.006em; }
.work-card .sub { font-size: 0.86rem; color: var(--ink-3); margin-top: 3px; }
.work-card .count { display: none; }

/* Side projects */
.projects { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--col-gap); border-top: 1px solid var(--line); }
.project { display: flex; flex-direction: column; gap: 12px; padding: 32px 0 36px; border-bottom: 1px solid var(--line); }
.project .name { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.project .name h3 { font-size: 1.5rem; }
.project .name .url { font-size: 0.82rem; color: var(--ink-3); white-space: nowrap; transition: color 160ms ease; }
.project:hover .name h3 { display: inline; background: var(--pink); box-shadow: 0 0 0 3px var(--pink); }
.project .tag { font-family: var(--serif); font-style: italic; font-size: 1.15rem; line-height: 1.4; color: var(--ink-2); text-wrap: balance; }
.project p { font-size: 0.95rem; color: var(--ink-2); }
.project .foot { margin-top: auto; padding-top: 6px; font-size: 0.82rem; color: var(--ink-3); }

/* Case study */
h2 a { text-decoration: none; }
h2 a:hover { background: var(--pink); box-shadow: 0 0 0 4px var(--pink); box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.case-shot a { display: block; }
.case-shot { margin: 0 0 40px; }
.case-shot img { width: 100%; border: 1px solid var(--line); }
.case-shot figcaption { margin-top: 12px; font-size: 0.84rem; color: var(--ink-3); }
.case-shot figcaption a { text-decoration: underline; text-underline-offset: 0.2em; text-decoration-color: var(--line); }
.case-shot figcaption a:hover { text-decoration-color: transparent; background: var(--pink); box-shadow: 0 0 0 2px var(--pink); }
.stats { list-style: none; margin: 0 0 48px; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stats li { padding: 22px 0; display: flex; flex-direction: column; gap: 4px; }
.stats strong { font-family: var(--serif); font-weight: 400; font-size: 2.2rem; line-height: 1; letter-spacing: -0.02em; }
.stats span { font-size: 0.86rem; color: var(--ink-3); }
.case-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px var(--col-gap); margin-bottom: 48px; }
.case-cols h3 { margin-bottom: 12px; }
.case-cols p { font-size: 0.97rem; }
.case-cols-late { margin-bottom: 0; padding-top: 48px; border-top: 1px solid var(--line); }
.case-shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 8px; }
.case-shots figure { margin: 0; }
.case-shots img { width: 100%; border: 1px solid var(--line); }
.case-shots figcaption { margin-top: 10px; font-size: 0.84rem; color: var(--ink-3); line-height: 1.45; }

/* Note */
.note-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px var(--col-gap); align-items: start; }
.note-figure { margin: 0; position: sticky; top: 88px; order: -1; }
.note-figure img { width: 100%; border: 1px solid var(--line); }
.note-inner { max-width: 62ch; }
.note-inner h2 { margin-bottom: 20px; }
.note-inner p { font-size: 1.05rem; }
.note-actions { margin-top: 28px; display: flex; gap: 28px; flex-wrap: wrap; }

/* Thoughts */
.essays { border-top: 1px solid var(--line); }
.essay {
  display: grid;
  grid-template-columns: var(--label-col) 1fr;
  gap: 16px var(--col-gap);
  padding: 48px 0;
  border-bottom: 1px solid var(--line);
}
.essay:last-child { border-bottom: 0; padding-bottom: 0; }
.essay-label { position: sticky; top: 88px; align-self: start; }
.essay-label h3 { font-size: 1.4rem; margin-bottom: 6px; }
.essay-label p { font-size: 0.95rem; }
.essay-body p, .essay-body li { max-width: var(--measure); }
.essay-body h4 { font-family: var(--serif); font-weight: 400; font-size: 1.2rem; margin: 32px 0 10px; }
.pull {
  margin: 28px 0;
  padding-left: 22px;
  border-left: 1px solid var(--ink);
  font-family: var(--serif);
  font-size: 1.45rem;
  line-height: 1.32;
  letter-spacing: -0.006em;
  max-width: 30ch;
  text-wrap: balance;
}
.pull cite { display: block; margin-top: 10px; font-family: var(--sans); font-style: normal; font-size: 0.82rem; color: var(--ink-3); }

/* Testimonials */
.quotes { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--col-gap); border-top: 1px solid var(--line); }
.quote {
  margin: 0;
  padding: 36px 0;
  border-bottom: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 20px;
}
.quote p { font-family: var(--serif); font-size: 1.2rem; line-height: 1.42; margin: 0; text-wrap: pretty; text-indent: -0.42em; max-width: 44ch; }
.quote p::before { content: "\201C"; color: var(--ink-3); }
.quote p::after { content: "\201D"; color: var(--ink-3); }
.quote:last-child, .quote:nth-last-child(2):nth-child(odd) { border-bottom: 0; }
.quote cite {
  font-style: normal; font-size: 0.84rem; color: var(--ink-3); line-height: 1.4;
  margin-top: auto;
  display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: center;
}
.quote cite img { width: 40px; height: 40px; border-radius: 999px; object-fit: cover; background: var(--paper-2); }
.quote cite strong { display: block; color: var(--ink); font-weight: 500; font-size: 0.92rem; }

/* Footer */
.site-footer { padding: 40px 0; border-top: 1px solid var(--line); }
.site-footer .colophon { font-size: 0.82rem; color: var(--ink-3); }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 50; display: none; background: rgba(18, 18, 20, 0.97); color: var(--dark-text); }
.lightbox.open { display: block; }
.lightbox-stage { position: absolute; inset: 0; z-index: 1; display: grid; grid-template-rows: 1fr auto; padding: 72px clamp(16px, 8vw, 120px) 32px; }
.lightbox-media { display: flex; align-items: center; justify-content: center; min-height: 0; }
.lightbox-media img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.lightbox-media iframe { width: min(100%, 1100px); aspect-ratio: 16 / 9; height: auto; max-height: 100%; border: 0; background: #000; }
.lightbox-caption { text-align: center; padding-top: 18px; font-size: 0.9rem; color: var(--dark-muted); min-height: 2.8em; }
.lightbox-caption strong { display: block; color: var(--dark-text); font-weight: 500; }
.lightbox-btn { position: absolute; z-index: 3; width: 44px; height: 44px; border: 0; background: none; color: var(--dark-text); cursor: pointer; display: grid; place-items: center; opacity: 0.7; transition: opacity 160ms ease; }
.lightbox-btn:hover { opacity: 1; }
.lightbox-btn svg { width: 22px; height: 22px; }
.lightbox-close { top: 16px; right: 16px; }
.lightbox-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 12px; top: 50%; transform: translateY(-50%); }
.lightbox-count { position: absolute; z-index: 3; top: 28px; left: 24px; font-size: 0.8rem; color: var(--dark-muted); letter-spacing: 0.06em; }
body.lightbox-open { overflow: hidden; }

/* Responsive */
@media (max-width: 1000px) {
  .work-grid { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 0 24px; }
  .stats li { border-bottom: 1px solid var(--line); }
  .stats li:nth-last-child(-n+2) { border-bottom: 0; }
  .header-meta { display: none; }
  .site-header .wrap { grid-template-columns: auto 1fr; }
  .site-nav { justify-self: end; gap: 20px; }
}
@media (max-width: 820px) {
  .hero-inner { grid-template-columns: 1fr; min-height: 0; }
  .hero-photo { order: -1; padding: calc(64px + 24px) var(--gutter) 0; }
  .hero-photo img { max-height: none; aspect-ratio: 4 / 5; }
  .card-head span:last-child, .card-foot span:last-child { display: none; }
  .hero-copy { padding: 28px var(--gutter) clamp(40px, 8vw, 64px); }
  .hero h1 { max-width: none; }
  .role, .essay { grid-template-columns: 1fr; gap: 12px; }
  .essay-label { position: static; }
  .role-when { padding-top: 0; }
  .projects, .quotes, .case-cols, .case-shots, .note-grid { grid-template-columns: 1fr; }
  .note-figure { position: static; order: 0; }
}
@media (max-width: 640px) {
  body { font-size: 16.5px; }
  h1 { max-width: none; }
  .site-header .wrap { grid-template-columns: 1fr auto; }
  .site-nav {
    display: none;
    justify-self: stretch;
    position: absolute; left: 0; right: 0; top: 64px;
    flex-direction: column; gap: 0;
    background: var(--paper);
    color: var(--ink);
    border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 16px;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px 0; border-top: 1px solid var(--line); opacity: 1; }
  .site-nav a::after { display: none; }
  .nav-toggle { display: block; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
  .work-grid { grid-template-columns: 1fr; }
  .lightbox-stage { padding: 64px 12px 24px; }
  .lightbox-prev, .lightbox-next { top: auto; bottom: 12px; transform: none; }
  .lightbox-prev { left: 12px; }
  .lightbox-next { right: 12px; }
  .lightbox-caption { padding-bottom: 56px; }
}

/* Jev: readers, fit panel, ask console, tags */
.readers { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 18px 0 0; font-size: 0.86rem; }
.readers-label { color: var(--ink-3); margin-right: 4px; }
.readers button { font: inherit; font-size: 0.84rem; color: var(--ink); background: none; border: 1px solid var(--line); padding: 4px 10px; cursor: pointer; }
.readers button:hover { background: var(--pink); border-color: var(--pink); }
.readers button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.readers-note { flex-basis: 100%; font-size: 0.82rem; color: var(--ink-3); min-height: 1.2em; }
[data-jev] { display: none; }
.js [data-jev] { display: flex; }
.js .ask[data-jev] { display: block; }

.fit { margin-top: clamp(40px, 6vw, 72px); padding-top: clamp(32px, 4vw, 48px); border-top: 1px solid var(--line); }
.fit-intro { max-width: none; color: var(--ink-2); }
.fit-list { list-style: none; margin: 24px 0 0; padding: 0; border-top: 1px solid var(--line); }
.fit-list li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) 56px; gap: 24px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); margin: 0; font-size: 0.95rem; }
.fit-bar { display: block; height: 6px; background: var(--paper-2); border: 1px solid var(--line); }
.fit-bar i { display: block; height: 100%; background: var(--ink); }
.fit-p { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.84rem; text-align: right; }
.fit-note { margin-top: 18px; max-width: none; color: var(--ink-2); }
.fit-note strong { font-weight: 500; color: var(--ink); }

.ask { margin-top: 0; padding: 26px 0 30px; border-top: 1px solid var(--line); max-width: none; }
.ask .eyebrow { margin-bottom: 12px; }
.ask-form { display: flex; gap: 0; border: 1px solid var(--ink); }
.ask-form input { flex: 1; min-width: 0; font: inherit; font-size: 1.05rem; padding: 14px 16px; border: 0; background: transparent; color: var(--ink); }
.ask-form input:focus { outline: none; background: #fff; }
.ask-form button { font: inherit; font-size: 0.9rem; font-weight: 500; padding: 0 18px; border: 0; border-left: 1px solid var(--ink); background: var(--ink); color: var(--paper); cursor: pointer; }
.ask-form button:hover { background: var(--pink); color: var(--ink); }
.ask-form button[disabled] { opacity: 0.5; cursor: wait; }
.ask-hint { margin-top: 10px; font-size: 0.84rem; color: var(--ink-3); max-width: none; }
.ask-answer { margin-top: 18px; font-size: 1.05rem; min-height: 1.5em; }
.ask-answer .verdict { font-family: var(--serif); font-size: 1.5rem; margin-right: 10px; }
.ask-answer .p { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.86rem; color: var(--ink-3); }
.ask-answer a { text-decoration: underline; text-underline-offset: 0.2em; text-decoration-color: var(--line); }
.ask-answer a:hover { background: var(--pink); box-shadow: 0 0 0 2px var(--pink); text-decoration-color: transparent; }
.ask-answer .err { color: var(--ink-2); }
.jev-flash { animation: jev-flash 2.4s ease-out; }
@keyframes jev-flash { 0% { box-shadow: inset 0 0 0 9999px color-mix(in srgb, var(--pink) 28%, transparent); } 100% { box-shadow: inset 0 0 0 9999px transparent; } }

.jev-tag { display: block; margin-top: 4px; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.72rem; letter-spacing: 0.02em; color: var(--ink-3); }
.jev-tag:empty { display: none; }
.lightbox-caption .checked { display: block; margin-top: 8px; font-size: 0.78rem; color: var(--dark-muted); opacity: 0.75; }
.holes[title] { cursor: help; }
@media (max-width: 640px) {
  .fit-list li { grid-template-columns: 1fr 44px; }
  .fit-bar { grid-column: 1 / -1; }
}
