/* developers · owner P4
   A black terminal that types a sample session as it scrolls into view, a balance.ts tab,
   and a "runs unchanged" list that ticks as the session reaches each tool. Static = final state. */
#developers { padding: var(--sec) 0; }
#developers .dev__title { text-wrap: pretty; }
#developers .dev__lede { margin-top: clamp(22px, 2.4vw, 32px); font-size: clamp(17px, 1.3vw, 19px); line-height: 1.5; max-width: 26em; }

/* terminal */
#developers .term { position: relative; margin-top: clamp(40px, 5vw, 72px); min-width: 0; background: #000; color: var(--g1); clip-path: polygon(0 0, calc(100% - 36px) 0, 100% 36px, 100% 100%, 0 100%); }
#developers .term__bar { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 0 16px; padding: 4px 46px 4px 12px; border-bottom: 1px solid #262626; }
#developers .term__tabs { display: flex; margin-right: auto; }
#developers .term__tabs button { position: relative; min-height: 46px; padding: 0 10px; border: 0; background: none; color: var(--muted-dk); font-size: 13.5px; font-weight: 600; font-stretch: 105%; cursor: pointer; transition: color .25s; }
#developers .term__tabs button:hover, #developers .term__tabs button[aria-selected="true"] { color: #fff; }
#developers .term__tabs button::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 7px; height: 2px; background: var(--v-dk); transform: scaleX(0); transform-origin: 0 50%; transition: transform .5s var(--ease-out); }
#developers .term__tabs button[aria-selected="true"]::after { transform: scaleX(1); }
#developers .term__tag { font-size: 12.5px; color: var(--muted-dk); white-space: nowrap; }
#developers .term__btn { min-height: 44px; padding: 0 4px; border: 0; background: none; color: #fff; font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
#developers .term__btn:hover { color: var(--v-dk); }
#developers .term__btn[hidden] { display: none; }
#developers .term__prog { position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--v-dk); transform-origin: 0 50%; transform: scaleX(0); }
#developers .term__panel { min-height: var(--ph, 0); padding: 22px 26px 28px; font-family: var(--mono); font-size: clamp(12.5px, 1.1vw, 15.5px); line-height: 1.72; }
#developers .term__panel[hidden] { display: none; }
#developers .term__panel:focus-visible { outline-offset: -4px; }
#developers .tl { min-height: 1.72em; white-space: pre-wrap; overflow-wrap: anywhere; color: #b5b5b5; }
#developers .tl--c { color: #8f8f8f; }
#developers .tl--cmd, #developers .tl--hi { color: #fff; }
#developers .tl--gap { min-height: .8em; }
#developers .tp { color: var(--v-dk); }
#developers .tv { color: var(--v-dk); }
#developers .tl[data-h] { visibility: hidden; }
#developers .tcur { display: inline-block; width: .6em; height: 1.18em; margin-left: .08em; vertical-align: -0.22em; background: var(--v-dk); }
#developers .tcur[data-blink] { animation: developers-blink 1.06s steps(1) infinite; }
@keyframes developers-blink { 50% { opacity: 0; } }
#developers .term__code { margin: 0; font: inherit; white-space: pre-wrap; overflow-wrap: anywhere; color: #e6e6e6; }
#developers .term__code .k { color: var(--v-dk); }
#developers .term__code .s { color: #d4d4d4; }
#developers .term__code .c { color: #8f8f8f; }

/* runs unchanged */
#developers .runs { margin-top: clamp(40px, 5vw, 64px); min-width: 0; }
#developers .runs__k { padding-bottom: 14px; border-bottom: 2px solid #000; font-size: 14px; font-weight: 600; font-stretch: 112%; }
#developers .runs__list { list-style: none; margin: 0; padding: 0; }
#developers .runs__list li { position: relative; display: grid; grid-template-columns: 28px 1fr; column-gap: 14px; padding: 15px 0 16px; border-bottom: 1px solid rgba(0, 0, 0, 0.18); }
#developers .runs__list li::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--v); transform-origin: 0 50%; transform: scaleX(0); transition: transform .9s var(--ease-out); }
#developers .runs__list b { grid-column: 2; font-size: clamp(18px, 1.45vw, 21px); font-weight: 600; font-stretch: 112%; letter-spacing: -0.01em; line-height: 1.2; }
#developers .runs__list span { grid-column: 2; margin-top: 4px; font-size: 14.5px; line-height: 1.45; color: var(--muted); }
#developers .tick { grid-row: 1 / span 2; display: grid; place-items: center; width: 26px; height: 26px; margin-top: -1px; background: var(--v); clip-path: polygon(7px 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%, 0 7px); transition: background-color .3s; }
#developers .tick svg { width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: square; stroke-dasharray: 20; stroke-dashoffset: 0; transition: stroke-dashoffset .5s .12s var(--ease-out); }
html.motion #developers .runs__list li:not([data-on]) .tick { background: rgba(0, 0, 0, 0.12); }
html.motion #developers .runs__list li:not([data-on]) .tick svg { stroke-dashoffset: 20; }
html.motion #developers .runs__list li[data-on]::after { transform: scaleX(1); }
#developers .dev__fine { margin-top: 22px; max-width: 30em; }
@media (min-width: 900px) {
  #developers .dev__title { grid-column: 1 / span 7; grid-row: 1; }
  #developers .dev__lede { grid-column: 9 / span 4; grid-row: 1; align-self: end; margin-top: 0; padding-bottom: .35em; }
  #developers .term { grid-column: 1 / span 8; grid-row: 2; align-self: start; }
  #developers .runs { grid-column: 9 / span 4; grid-row: 2; margin-top: clamp(40px, 5vw, 72px); }
}
/* phones: "Sample" stays beside Copy; the session box reserves under half the screen and grows line by line
   (only ever downward, below the reading point), and the short balance.ts tab takes its own height */
@media (max-width: 520px) {
  #developers .term__bar { gap: 0 10px; padding: 4px 22px 4px 4px; }
  #developers .term__tabs button { padding: 0 8px; }
  #developers .term__tabs button::after { left: 8px; right: 8px; }
  #developers .term__tag-x { display: none; }
  #developers .term__panel { padding: 16px 16px 22px; min-height: min(var(--ph, 0px), 45vh); min-height: min(var(--ph, 0px), 45svh); }
  #developers .tl[data-h] { display: none; }
  #developers #term-ts { min-height: 0; }
}
/* the narrowest phones: once Replay shows, it takes the tag's place (the first transcript line still says "sample session") */
@media (max-width: 420px) {
  #developers .term__bar:has(#term-replay:not([hidden])) .term__tag { display: none; }
}
#developers .dev__app { margin-top: 14px; color: var(--v); }
