/*
  /changelog: the landing page's styles.css first (tokens, header, footer, buttons), then this.
  Every story is a sentence on paper (the customer's words) over an ink slab (sic's work).
  The send moment: the key presses, the caret stops, the slab unfolds downward and its media
  rises. Set by changelog.js only for stories below the first screen, never under reduced motion.
*/

/* A local Arial sized to Inter's metrics, so the swap to Inter does not move the big type. */
@font-face {
  font-family: "Inter Fallback";
  src: local("Arial"), local("ArialMT");
  size-adjust: 107.06%;
  ascent-override: 90.49%;
  descent-override: 22.56%;
  line-gap-override: 0%;
}

.cl {
  --sans: "Inter", "Inter Fallback", system-ui, sans-serif;
  font-family: var(--sans);
  --cl-ease: var(--ease-out, cubic-bezier(0.16, 1, 0.3, 1));
  --cl-r-field: 18px;
  --cl-r-slab: var(--radius-slab, 20px);
  --cl-r-media: 12px;
}

.cl ::selection {
  background: rgb(11 11 11 / 15%);
}

.cl-slab ::selection {
  background: rgb(194 255 74 / 35%);
  color: var(--ink);
}

/* ---------- Hero: the edition ---------- */

/* The edition: the title across the page, then the intro beside the index. */
.cl-hero {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(36px, 6vh, 80px) var(--gut) clamp(8px, 2vw, 24px);
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  column-gap: clamp(32px, 5vw, 80px);
  row-gap: clamp(28px, 3.4vw, 48px);
  align-items: start;
}

.cl-hero__title {
  grid-column: 1 / -1;
  font-size: clamp(64px, 15.2vw, 224px);
  line-height: 0.82;
  font-weight: 800;
  letter-spacing: -0.058em;
  margin-left: -0.065em;
  white-space: nowrap;
}

.cl-hero__lede {
  display: grid;
  gap: 18px;
}

.cl-hero__note {
  max-width: 40ch;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--mute);
}

.cl-hero__intro {
  max-width: 30ch;
  font-size: clamp(19px, 1.7vw, 23px);
  line-height: 1.4;
  letter-spacing: -0.012em;
  color: rgb(11 11 11 / 78%);
}

.cl-edition {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 16px;
  padding-bottom: 12px;
  border-bottom: 1.5px solid var(--ink);
  font-size: 14px;
  font-weight: 600;
}

.cl-edition .mono {
  font-weight: 500;
  font-size: 13px;
}

.cl-index li {
  border-bottom: 1px solid var(--hair);
}

.cl-index a {
  display: grid;
  gap: 2px;
  padding: 12px 0 13px;
  font-size: 16.5px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.cl-index__where {
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--mute);
}

/* The index answers in the page's verb: the line slides like a sent sentence. */
.cl-index a {
  transition: translate 280ms var(--cl-ease), color 160ms ease-out;
}

@media (hover: hover) {
  .cl-index a:hover {
    translate: 6px 0;
  }
}

.cl-index a:focus-visible {
  translate: 6px 0;
}

/* ---------- A story ---------- */

.cl-story {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(56px, 8vw, 120px) var(--gut) 0;
}

.cl-hero + .cl-story {
  padding-top: clamp(48px, 6vw, 88px);
}

.cl-story {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(16px, 2vw, 28px);
  scroll-margin-top: 72px;
}

.cl-story > * {
  grid-column: 1 / -1;
}

.cl-kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 14px;
  font-size: 14px;
  font-weight: 600;
}

.cl-kicker time {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--mute);
}

.cl-title {
  grid-column: 1 / span 9;
  margin-top: 14px;
  font-size: clamp(36px, 4.6vw, 64px);
  line-height: 0.98;
  font-weight: 800;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.cl-story--lead .cl-title {
  grid-column: 1 / span 10;
  font-size: clamp(42px, 6.2vw, 88px);
  line-height: 0.94;
  letter-spacing: -0.05em;
}

/* What the change lets the reader do, in one or two sentences under the headline. */
.cl-lede {
  grid-column: 1 / span 8;
  margin-top: clamp(16px, 1.8vw, 24px);
  font-size: clamp(18px, 1.55vw, 21px);
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: rgb(11 11 11 / 80%);
  text-wrap: pretty;
}

.cl-story--ui .cl-lede + .cl-slab,
.cl-story--ui .cl-lede + .cl-marker + .cl-slab {
  margin-top: clamp(24px, 3vw, 40px);
}

/* The customer's sentence: a paper field with an ink send key. */
.cl-ask {
  grid-column: 1 / span 9;
  margin-top: clamp(24px, 3vw, 40px);
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 76px;
  padding: 14px 14px 14px clamp(18px, 2vw, 26px);
  background: var(--paper);
  border: 1px solid var(--hair-strong);
  border-radius: var(--cl-r-field);
  box-shadow: 0 1px 0 rgb(11 11 11 / 4%), 0 18px 36px -26px rgb(11 11 11 / 45%);
}

.cl-story--lead .cl-ask {
  min-height: 92px;
}

.cl-ask__text {
  font-size: clamp(20px, 2.2vw, 30px);
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.cl-story--lead .cl-ask__text {
  font-size: clamp(22px, 2.25vw, 33px);
}

.cl-ask__caret {
  display: inline-block;
  width: 2px;
  height: 0.95em;
  margin-left: 4px;
  vertical-align: -0.1em;
  background: var(--ink);
  animation: cl-blink 1.1s steps(1) infinite;
}

.cl-ask.is-sent .cl-ask__caret {
  opacity: 0;
  animation: none;
}

.cl-ask__send {
  flex: none;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-left: auto;
  border-radius: 12px;
  background: var(--ink);
  color: var(--lime);
}

.cl-ask__send svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@keyframes cl-blink {
  50% { opacity: 0; }
}

/* sic's work: the ink slab with the landing page's dot grid. */
.cl-slab {
  margin-top: -1px;
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: clamp(24px, 3vw, 48px);
  align-items: start;
  padding: clamp(24px, 3.2vw, 44px);
  border-radius: var(--cl-r-slab);
  background-color: var(--ink);
  background-image: radial-gradient(rgb(255 255 255 / 6%) 1px, transparent 1px);
  background-size: 24px 24px;
  background-position: 12px 12px;
  color: #fff;
}

.cl-ask + .cl-slab,
.cl-ask + .cl-marker + .cl-slab {
  margin-top: 14px;
}

/* What you can do now: each line opens with the ability in bold. */
.cl-can {
  display: grid;
  gap: 14px;
}

.cl-can li {
  position: relative;
  padding-left: 18px;
}

.cl-can li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--lime);
}

.cl-can b {
  color: #fff;
  font-weight: 600;
}

/* A product story: three abilities side by side over a full-width screenshot. */
.cl-slab--ui {
  grid-template-columns: minmax(0, 1fr);
  row-gap: clamp(28px, 3vw, 44px);
}

.cl-can--row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: clamp(20px, 3vw, 44px);
}

/* The question the answer leads to next. */
.cl-followup {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border: 1px dashed rgb(194 255 74 / 40%);
  border-radius: 12px;
  font-size: 14.5px;
  line-height: 1.5;
  color: rgb(255 255 255 / 86%);
}

.cl-followup__label {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--lime);
}

.cl-slab--flip {
  grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
}

.cl-slab--flip .cl-slab__text {
  order: 2;
}

.cl-slab__text {
  display: grid;
  gap: 14px;
  font-size: 16.5px;
  line-height: 1.55;
  color: rgb(255 255 255 / 86%);
  padding-top: 4px;
}

.cl-slab__label {
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--lime);
  margin-bottom: 2px;
}

.cl-next {
  display: flex;
  gap: 10px;
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px solid var(--hair-ink);
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--slab-copy);
}

.cl-next b {
  color: #fff;
  font-weight: 600;
}

.cl-next__dot {
  flex: none;
  width: 8px;
  height: 8px;
  margin-top: 7px;
  border-radius: 50%;
  background: var(--lime);
}

.cl-slab__media {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.cl-shot {
  display: grid;
  gap: 10px;
}

.cl-shot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--cl-r-media);
  box-shadow: 0 0 0 1px rgb(255 255 255 / 10%);
  background: var(--paper);
}

.cl-shot figcaption,
.cl-output figcaption {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  align-items: center;
  font-size: 13px;
  line-height: 1.4;
  color: var(--slab-copy);
}

.cl-shot .tag,
.cl-output .tag {
  flex: none;
}

/* Real tool output, set as text: what the customer's Claude receives from sic. */
.cl-output {
  display: grid;
  gap: 10px;
}

.cl-output__box {
  border-radius: var(--cl-r-media);
  background: var(--ink-2, #161614);
  box-shadow: 0 0 0 1px rgb(255 255 255 / 10%);
  overflow: hidden;
}

.cl-output__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--hair-ink);
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}

.cl-output__head .mono {
  font-weight: 500;
  color: var(--slab-copy);
}

.cl-output pre {
  margin: 0;
  padding: 16px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.6;
  color: rgb(255 255 255 / 84%);
  white-space: pre;
  tab-size: 2;
}

.cl-output pre .hl {
  color: var(--lime);
}

.cl-slab__media--full {
  grid-column: 1 / -1;
}

.cl-shot__frame {
  position: relative;
}

/* A lime ring on the one thing the story is about. Positions are % of the image. */
.cl-mark {
  position: absolute;
  border: 2px solid var(--lime);
  border-radius: 8px;
  box-shadow: 0 0 0 4px rgb(194 255 74 / 18%);
  pointer-events: none;
}

/* Story 4: the proposal, with the task's side panel laid over its lower corner. */
.cl-collage {
  position: relative;
}

.cl-collage figcaption {
  margin-top: 26px;
  padding-right: 30%;
}

.cl-inset {
  position: absolute;
  right: -18px;
  bottom: 30px;
  width: 28%;
  rotate: -1.2deg;
  border-radius: 10px;
  box-shadow: 0 0 0 1px rgb(255 255 255 / 14%), 0 24px 40px -12px rgb(0 0 0 / 70%);
}

.cl-inset img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
}

.cl-only-phone {
  display: none;
}

/* Claude's answer and sic's reply, set as text on raised ink. */
.cl-answer__body {
  display: grid;
  gap: 12px;
  padding: 16px 18px 18px;
  font-size: 15px;
  line-height: 1.55;
  color: rgb(255 255 255 / 86%);
}

.cl-answer__body b {
  color: #fff;
  font-weight: 600;
}

.cl-answer__body ul {
  display: grid;
  gap: 4px;
  padding-left: 1.1em;
  list-style: disc;
}

.cl-answer__body li::marker {
  color: var(--slab-dim);
}

.cl-answer__cut {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--slab-dim);
}

.cl-answer__cut::before,
.cl-answer__cut::after {
  content: "";
  flex: 1;
  border-top: 1px dashed rgb(255 255 255 / 18%);
}

/* A link in Claude's answer, shown as text: the page has no target for it. */
.cl-answer__link {
  color: var(--lime);
}

.cl-answer__body i {
  color: #fff;
}

.cl-answer__table {
  overflow-x: auto;
}

.cl-answer__table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.cl-answer__table th,
.cl-answer__table td {
  padding: 7px 12px 7px 0;
  border-bottom: 1px solid var(--hair-ink);
  text-align: left;
  white-space: nowrap;
}

.cl-answer__table thead th {
  font-weight: 500;
  font-size: 12.5px;
  color: var(--slab-copy);
}

.cl-answer__table tbody th {
  font-weight: 600;
  color: #fff;
}

.cl-reply {
  padding: 16px 18px 18px;
  font-size: 17px;
  line-height: 1.5;
  color: #fff;
}

/* ---------- The send moment (armed by changelog.js) ---------- */

.cl-marker {
  grid-column: 1 / -1;
  height: 0;
}

/* Folded: only the slab's top lip shows under the field, so the space reads as waiting. */
.cl-story.is-armed .cl-slab {
  clip-path: inset(0 0 calc(100% - 22px) 0 round var(--cl-r-slab));
}

.cl-story.is-armed .cl-slab__media,
.cl-story.is-armed .cl-slab__text {
  translate: 0 36px;
  opacity: 0;
}

.cl-story.is-open .cl-slab {
  clip-path: inset(0 0 0 0 round var(--cl-r-slab));
  transition: clip-path 760ms var(--cl-ease) 40ms;
}

.cl-story.is-open .cl-slab__text,
.cl-story.is-open .cl-slab__media {
  translate: 0 0;
  opacity: 1;
  transition: translate 900ms var(--cl-ease), opacity 500ms ease-out;
}

.cl-story.is-open .cl-slab__text { transition-delay: 180ms; }
.cl-story.is-open .cl-slab__media { transition-delay: 300ms; }

.cl-ask.is-pressing .cl-ask__send {
  animation: cl-press 320ms var(--cl-ease);
}

.cl-ask.is-pressing .cl-ask__text {
  animation: cl-lift 520ms var(--cl-ease);
}

@keyframes cl-press {
  0% { scale: 1; }
  35% { scale: 0.86; background: var(--lime); color: var(--ink); }
  100% { scale: 1; }
}

@keyframes cl-lift {
  0% { translate: 0 0; }
  40% { translate: 0 -4px; }
  100% { translate: 0 0; }
}

/* ---------- Earlier changes ---------- */

.cl-earlier {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(80px, 11vw, 152px) var(--gut) 0;
  scroll-margin-top: 72px;
}

.cl-earlier__title {
  font-size: clamp(30px, 3.4vw, 46px);
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.04em;
  padding-bottom: clamp(16px, 2vw, 24px);
  border-bottom: 1.5px solid var(--ink);
}

/* Newest first down each column: rows = half the list, rounded up (set as --rows on the list). */
.cl-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(var(--rows, 5), auto);
  grid-auto-flow: column;
  column-gap: clamp(24px, 4vw, 64px);
}

.cl-list li {
  display: grid;
  align-content: start;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 2px 14px;
  padding: 15px 0 16px;
  border-bottom: 1px solid var(--hair);
}

.cl-list time {
  grid-row: span 2;
  padding-top: 3px;
  font-size: 12.5px;
  color: var(--mute);
}

.cl-list__what {
  font-size: 16px;
  line-height: 1.4;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.cl-list__where {
  font-size: 13px;
  color: var(--mute);
}

/* ---------- Close ---------- */

.cl-close {
  max-width: var(--wrap);
  margin: clamp(80px, 11vw, 152px) auto clamp(40px, 6vw, 72px);
  padding: 0 var(--gut);
}

.cl-close__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px 48px;
  padding: clamp(32px, 5vw, 64px);
  border-radius: var(--cl-r-slab);
  background-color: var(--ink);
  background-image: radial-gradient(rgb(255 255 255 / 6%) 1px, transparent 1px);
  background-size: 24px 24px;
  color: #fff;
}

.cl-close__title {
  max-width: 14ch;
  font-size: clamp(36px, 5vw, 72px);
  line-height: 0.98;
  font-weight: 700;
  letter-spacing: -0.045em;
}

/* On ink: the lime focus ring, and a lime edge that keeps a flooded lime button visible. */
.cl-close :focus-visible,
.cl-slab :focus-visible {
  outline-color: var(--lime);
}

.cl-close .btn--lime,
.cl-slab .btn--lime {
  border-color: var(--lime);
}

/* A phone crop that ends mid-row fades out instead of cutting a sentence. */
.cl-fade img {
  -webkit-mask-image: linear-gradient(to bottom, #000 78%, transparent);
  mask-image: linear-gradient(to bottom, #000 78%, transparent);
}

/* ---------- Narrow screens ---------- */

@media (max-width: 1024px) {
  .cl-slab,
  .cl-slab--flip {
    grid-template-columns: minmax(0, 1fr);
  }

  .cl-slab--flip .cl-slab__text {
    order: 0;
  }

  .cl-slab__text {
    max-width: 62ch;
  }
}

@media (max-width: 760px) {
  .cl-hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .cl-lede {
    grid-column: 1 / -1;
  }

  .cl-can--row {
    grid-template-columns: minmax(0, 1fr);
  }

  .cl-title,
  .cl-story--lead .cl-title,
  .cl-ask,
  .cl-story--lead .cl-ask {
    grid-column: 1 / -1;
  }

  .cl-ask {
    align-items: flex-end;
    min-height: 0;
    padding: 16px 12px 12px 18px;
  }

  .cl-ask__send {
    width: 44px;
    height: 44px;
  }

  .cl-list {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    grid-auto-flow: row;
  }

}

@media (max-width: 640px) {
  .cl-only-desk {
    display: none;
  }

  .cl-only-phone {
    display: grid;
  }

  .cl-hero__title {
    font-size: clamp(56px, 20vw, 96px);
  }

  .cl-slab {
    padding: 22px 18px 18px;
    border-radius: 18px;
  }

  .cl-output pre {
    font-size: 11.5px;
    padding: 14px;
  }

  .cl-answer__body {
    padding: 14px;
    font-size: 14.5px;
  }

  .cl-answer__table table {
    font-size: 12.5px;
  }

  .cl-answer__table th,
  .cl-answer__table td {
    padding-right: 8px;
  }

  .cl-answer__table thead th {
    white-space: normal;
    vertical-align: bottom;
  }
}

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

  .cl-index a {
    transition: none;
  }
}
