/* Innovation Lab and Ask Tommy. Loaded after styles.css and uses its tokens, so the look stays the same as the rest of the site. */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.lab-tagline { font-weight: 600; color: var(--ink); max-width: 30em; }
.lab-lede { font-size: 17px; line-height: 1.6; color: var(--ink-70); max-width: 40em; }
.lab-section { padding-top: 28px; }

/* status and category tags */
.lab-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.lab-cat { font-family: var(--cond); font-weight: 700; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: #fff; background: var(--cobalt); padding: 3px 8px; }
.lab-status { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--ink); border: 1px solid var(--line); background: #fff; padding: 3px 10px; border-radius: 999px; }
.lab-status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--gray); }
.lab-status.live::before { background: #1a9e52; }
.lab-status.dev::before { background: #c27a00; }
.lab-status.exp::before { background: #6b5bd2; }

/* filters */
.lab-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.lab-chip { font: 600 14px/1 var(--sans); color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 10px 16px; cursor: pointer; min-height: 40px; transition: border-color .15s, background .15s, color .15s; }
.lab-chip:hover { border-color: var(--ink); }
.lab-chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.lab-chip:focus-visible, .lab-card a:focus-visible, .ask-suggest:focus-visible, .ask-follow:focus-visible, .ask-tool:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 2px; }
.lab-count { font-size: 13px; color: var(--ink-45); margin-bottom: 22px; }
.lab-empty { color: var(--ink-70); padding: 30px 0; }

/* gallery */
.lab-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px 24px; }
.lab-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line-soft); border-radius: 10px; overflow: hidden; transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
.lab-card[hidden] { display: none; }
.lab-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.lab-shot { display: block; aspect-ratio: 16 / 10; background: var(--surface-2); overflow: hidden; border-bottom: 1px solid var(--line-soft); }
.lab-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; transition: transform .5s var(--ease); }
.lab-card:hover .lab-shot img { transform: scale(1.03); }
.lab-card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.lab-card h3 { font-size: 21px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; margin-bottom: 8px; }
.lab-card h3 a { color: var(--ink); text-decoration: none; }
.lab-card h3 a:hover { color: var(--cobalt); }
.lab-card p { font-size: 15px; line-height: 1.55; color: var(--ink-70); margin-bottom: 16px; }
.lab-actions { margin-top: auto; display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; }
.lab-primary, .lab-secondary { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; text-decoration: none; min-height: 32px; }
.lab-primary { color: var(--cobalt); }
.lab-secondary { color: var(--ink); }
.lab-primary:hover, .lab-secondary:hover { text-decoration: underline; text-underline-offset: 3px; }

/* call out band, shared by the lab and project pages */
.lab-band { margin-top: 56px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 22px; background: var(--black); color: #fff; border-radius: 12px; padding: 34px 36px; }
.lab-band h2 { font-size: clamp(24px, 3vw, 32px); font-weight: 900; letter-spacing: -.03em; line-height: 1.1; margin: 8px 0 8px; color: #fff; }
.lab-band p { color: #c9cace; max-width: 36em; font-size: 16px; line-height: 1.55; }
.lab-band .eyebrow { color: #ff4b4b; }
.lab-band-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.lab-band .btn-ghost { color: #fff; border-color: rgba(255,255,255,.35); }
.lab-band .btn-ghost:hover { border-color: #fff; }

/* project page */
.lab-crumb { display: flex; gap: 8px; font-size: 14px; color: var(--ink-45); margin-bottom: 18px; }
.lab-crumb a { color: var(--ink-70); text-decoration: none; font-weight: 600; }
.lab-crumb a:hover { color: var(--cobalt); }
.lab-detail .intro-actions .textlink { max-width: 28em; }
.lab-hero { padding: 10px 0 0; }
.lab-hero-grid { display: grid; grid-template-columns: 1fr 230px; gap: 28px; align-items: end; }
.lab-browser { display: block; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); background: #fff; text-decoration: none; }
.lab-browser .bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: #f1f1f3; border-bottom: 1px solid var(--line-soft); }
.lab-browser .bar i { width: 10px; height: 10px; border-radius: 50%; background: #d6d6da; }
.lab-browser .bar span { margin-left: 10px; font-size: 12.5px; color: var(--ink-45); background: #fff; border-radius: 6px; padding: 3px 12px; }
.lab-browser img { display: block; width: 100%; height: auto; }
.lab-phone { border: 8px solid var(--black); border-radius: 30px; overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 390 / 760; background: #fff; }
.lab-phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.lab-shot-note { font-size: 13px; color: var(--ink-45); margin-top: 12px; }
.lab-story { padding-top: 56px; }
.lab-story-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; align-items: start; }
.lab-story-main h2 { font-size: 13px; font-family: var(--sans); font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--cobalt); margin: 34px 0 10px; }
.lab-story-main h2:first-child { margin-top: 0; }
.lab-story-main p, .lab-story-main li { font-size: 18px; line-height: 1.65; color: var(--ink); }
.lab-story-main ul { padding-left: 1.1em; display: grid; gap: 8px; margin-bottom: 8px; }
.lab-story-main .btn { margin-top: 10px; }
.lab-more { list-style: none; padding: 0 !important; margin-top: 18px; }
.lab-more a { font-size: 15px; font-weight: 700; color: var(--cobalt); text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
.lab-facts { position: sticky; top: 96px; border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 6px 22px; }
.lab-fact { padding: 16px 0; border-bottom: 1px solid var(--line-soft); }
.lab-fact:last-child { border-bottom: 0; }
.lab-fact .k { display: block; font-family: var(--cond); font-weight: 700; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-45); margin-bottom: 8px; }
.lab-fact p { font-size: 15px; line-height: 1.5; color: var(--ink-70); margin-top: 6px; }
.lab-fact a { color: var(--cobalt); font-weight: 700; text-decoration: none; }
.lab-next { padding-top: 0; }
.lab-pn { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; margin-top: 36px; border-top: 1px solid var(--line); padding-top: 22px; }
.lab-pn a { text-decoration: none; color: var(--ink); font-weight: 800; font-size: 17px; }
.lab-pn a span { display: block; font-family: var(--cond); font-weight: 700; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-45); margin-bottom: 4px; }
.lab-pn a:nth-child(2) { align-self: end; font-size: 14px; color: var(--cobalt); }
.lab-pn a:last-child { text-align: right; }
.lab-pn a:hover { color: var(--cobalt); }

/* Ask Tommy */
.ask-section { padding-top: 24px; }
.ask-wrap > * { max-width: 820px; }
.ask-form { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px; box-shadow: var(--shadow); }
.ask-label { display: block; font-family: var(--cond); font-weight: 700; font-size: 14px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-45); margin-bottom: 10px; }
.ask-row { display: flex; gap: 12px; align-items: flex-end; }
.ask-row textarea { flex: 1; font: 400 18px/1.45 var(--sans); color: var(--ink); border: 0; resize: none; min-height: 56px; max-height: 220px; padding: 6px 2px; background: transparent; }
.ask-row textarea:focus { outline: none; }
.ask-form:focus-within { border-color: var(--ink); }
.ask-go { flex: none; }
.ask-go[disabled] { opacity: .5; cursor: progress; transform: none; }
.ask-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; font-size: 12.5px; color: var(--ink-45); }
.ask-clear { font: 600 13px var(--sans); color: var(--ink-70); background: none; border: 0; text-decoration: underline; cursor: pointer; padding: 6px 0; }
.ask-h { font-family: var(--cond); font-weight: 700; font-size: 14px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-45); margin: 34px 0 14px; }
.ask-suggestions { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 0; }
.ask-suggest, .ask-follow { width: 100%; text-align: left; font: 600 15px/1.4 var(--sans); color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; cursor: pointer; transition: border-color .15s, transform .15s; min-height: 48px; }
.ask-suggest:hover, .ask-follow:hover { border-color: var(--cobalt); transform: translateY(-1px); }
.ask-thread { display: grid; gap: 26px; margin-top: 30px; }
.ask-turn { border-top: 1px solid var(--line); padding-top: 24px; }
.ask-you { font-size: 20px; font-weight: 800; letter-spacing: -.02em; line-height: 1.3; color: var(--ink); margin-bottom: 14px; }
.ask-badge { display: inline-flex; align-items: center; gap: 6px; font-family: var(--cond); font-weight: 700; font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--cobalt); margin-bottom: 10px; }
.ask-answer p, .ask-answer li { font-size: 17px; line-height: 1.65; color: var(--ink); }
.ask-answer p + p, .ask-answer ul + p, .ask-answer p + ul { margin-top: 12px; }
.ask-answer ul { padding-left: 1.2em; display: grid; gap: 6px; }
.ask-answer sup a { font-size: 11.5px; font-weight: 800; color: var(--cobalt); text-decoration: none; padding: 0 2px; }
.ask-sources { margin-top: 18px; border: 1px solid var(--line-soft); border-radius: 10px; background: var(--surface-2); padding: 6px 16px; }
.ask-sources h3 { font-family: var(--cond); font-weight: 700; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-45); margin: 10px 0 4px; }
.ask-sources ol { list-style: none; padding: 0; }
.ask-sources li { padding: 10px 0; border-top: 1px solid var(--line-soft); display: grid; grid-template-columns: 26px 1fr; gap: 4px 8px; }
.ask-sources li:first-child { border-top: 0; }
.ask-sources .n { font-weight: 800; color: var(--cobalt); font-size: 14px; }
.ask-sources a { font-weight: 700; color: var(--ink); text-decoration: none; font-size: 15px; }
.ask-sources a:hover { color: var(--cobalt); text-decoration: underline; }
.ask-sources .kind { display: block; font-size: 12.5px; color: var(--ink-45); margin-top: 2px; }
.ask-sources blockquote { grid-column: 2; font-size: 14px; line-height: 1.5; color: var(--ink-70); border-left: 2px solid var(--line); padding-left: 10px; margin-top: 4px; }
.ask-follows { display: grid; gap: 8px; margin-top: 16px; }
.ask-follows .ask-h { margin: 6px 0 2px; }
.ask-tools { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin-top: 14px; font-size: 13px; color: var(--ink-45); }
.ask-tool { font: 600 13px var(--sans); color: var(--ink-70); background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; cursor: pointer; min-height: 32px; }
.ask-tool:hover { border-color: var(--ink); }
.ask-tool[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.ask-loading { display: flex; align-items: center; gap: 10px; color: var(--ink-70); font-size: 15px; }
.ask-dots { display: inline-flex; gap: 4px; }
.ask-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--cobalt); animation: askpulse 1s infinite ease-in-out; }
.ask-dots i:nth-child(2) { animation-delay: .15s; } .ask-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes askpulse { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.ask-error { background: #fff4f4; border: 1px solid #f3c7c7; color: #8a1010; border-radius: 10px; padding: 14px 16px; font-size: 15px; line-height: 1.5; }
.ask-error button { margin-left: 8px; }
.ask-disclaimer { margin-top: 34px; font-size: 13.5px; line-height: 1.6; color: var(--ink-45); }
.ask-disclaimer b { color: var(--ink-70); }
.ask-next-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.ask-next-grid a { display: block; text-decoration: none; border: 1px solid var(--line); border-radius: 10px; padding: 14px; background: #fff; transition: border-color .15s; }
.ask-next-grid a:hover { border-color: var(--cobalt); }
.ask-next-grid b { display: block; color: var(--ink); font-size: 15px; margin-bottom: 4px; }
.ask-next-grid span { font-size: 13px; color: var(--ink-45); }

@media (max-width: 980px) {
  .lab-grid { grid-template-columns: repeat(2, 1fr); }
  .lab-story-grid { grid-template-columns: 1fr; gap: 32px; }
  .lab-facts { position: static; }
  .ask-next-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
  .lab-grid, .ask-suggestions { grid-template-columns: 1fr; }
  .lab-hero-grid { grid-template-columns: 1fr; }
  .lab-phone { display: none; }
  .lab-band { padding: 26px 22px; }
  .lab-pn { grid-template-columns: 1fr 1fr; }
  .lab-pn a:nth-child(2) { display: none; }
  .ask-row { flex-direction: column; align-items: stretch; }
  .ask-go { justify-content: center; }
  .lab-story-main p, .lab-story-main li { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  .lab-card, .lab-shot img, .ask-suggest, .ask-follow, .lab-chip { transition: none; }
  .lab-card:hover, .ask-suggest:hover, .ask-follow:hover { transform: none; }
  .lab-card:hover .lab-shot img { transform: none; }
  .ask-dots i { animation: none; opacity: .7; }
}

/* Live site previews that scroll on hover (lab.js) */
.scroller { position: relative; overflow: hidden; }
.scroller img { width: 100%; height: auto; object-fit: initial; transition: transform .9s cubic-bezier(.45,.05,.35,1); will-change: transform; }
.lab-card:hover .lab-shot.scroller img { transform: none; }
.lab-hint { position: absolute; right: 10px; bottom: 10px; font-size: 11.5px; font-weight: 700; letter-spacing: .02em; color: #fff; background: rgba(12,12,14,.78); padding: 5px 10px; border-radius: 999px; opacity: 0; transform: translateY(4px); transition: opacity .25s, transform .25s; pointer-events: none; }
.lab-card:hover .lab-hint, .lab-browser:hover .lab-hint { opacity: 1; transform: none; }
.scroller.is-scrolling .lab-hint { opacity: 0; transition-delay: .9s; }
.lab-browser .screen { aspect-ratio: 16 / 10; background: #fff; }
@media (hover: none) { .lab-hint { display: none; } }

/* honest stat strip, counted up on view */
.lab-stats { display: flex; flex-wrap: wrap; gap: 0; margin-top: 26px; border-top: 3px solid var(--ink); }
.lab-stats div { padding: 14px 28px 4px 0; margin-right: 28px; border-right: 1px solid var(--line); }
.lab-stats div:last-child { border-right: 0; }
.lab-stats dt { font-family: var(--cond); font-weight: 700; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-45); }
.lab-stats dd { font-size: 40px; font-weight: 900; letter-spacing: -.04em; line-height: 1.1; color: var(--ink); font-variant-numeric: tabular-nums; }
.lab-stats div:first-child dd { color: var(--cobalt); }
@media (max-width: 680px) { .lab-stats { display: grid; grid-template-columns: 1fr 1fr; } .lab-stats div { margin-right: 0; padding-right: 12px; border-right: 0; border-bottom: 1px solid var(--line); padding-bottom: 10px; } .lab-stats dd { font-size: 30px; } }

/* Ask Tommy: search steps, answer reveal, linked citations */
.ask-steps { list-style: none; padding: 0; display: grid; gap: 8px; margin-top: 4px; }
.ask-steps li { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--ink-45); transition: color .3s; }
.ask-steps li::before { content: ''; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); flex: none; transition: all .3s; }
.ask-steps li.on { color: var(--ink); font-weight: 600; }
.ask-steps li.on::before { border-color: var(--cobalt); border-top-color: transparent; animation: askspin .8s linear infinite; }
.ask-steps li.done { color: var(--ink-70); }
.ask-steps li.done::before { background: var(--cobalt); border-color: var(--cobalt); box-shadow: inset 0 0 0 3px #fff; animation: none; }
@keyframes askspin { to { transform: rotate(360deg); } }
.ask-reveal > * { animation: askup .5s cubic-bezier(.22,.61,.36,1) both; }
@keyframes askup { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.ask-sources li { transition: background .2s, box-shadow .2s; border-radius: 6px; }
.ask-sources li.hl { background: #fff; box-shadow: 0 0 0 2px var(--cobalt); }
.ask-answer sup a:hover, .ask-answer sup a.hl { background: var(--cobalt); color: #fff; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) {
  .scroller img { transition: none; }
  .ask-reveal > * { animation: none; }
  .ask-steps li.on::before { animation: none; }
}

/* Projects with no website yet: a still preview image and a plain "Coming soon" */
.lab-shot.lab-still img { object-position: center; }
.lab-soon { display: inline-flex; align-items: center; min-height: 32px; font-size: 14px; font-weight: 700; color: var(--ink-45); }
.lab-soon-btn { background: transparent; border: 1.5px dashed var(--line); color: var(--ink-45); cursor: default; }
.lab-still-hero { margin: 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); background: #0f1523; }
.lab-still-hero img { display: block; width: 100%; height: auto; max-height: 620px; object-fit: contain; margin: 0 auto; }
