/* Build on Slatebox: /developers/ and the pages under it, /open-source/, /enterprise/ and /plans/.
   Loaded after /style.css, /assets/hub.css and /assets/product/replay.css. Nothing here changes the shared sheets.

   .pf-duo        a dark pane (code or a terminal) beside the replay it drives
   .pf-pane       the pane itself: a bar with a file name, then a scroller with the lines
   .pf-code       a still block of code or a command, inside a card or a section
   .pf-tools      the list of tool, command or route names
   .pf-table      a comparison table that stays readable on a phone
   .pf-prices     the three plan cards on /plans/
   .pf-doc        a quiet page frame around an embedded slate */

/* ---- The pane beside a replay ---- */
.pf-duo { display: grid; grid-template-columns: minmax(0,.9fr) minmax(0,1fr); align-items: stretch; gap: clamp(8px,.8vw,12px); min-width: 0 }
.pf-duo.even { grid-template-columns: minmax(0,1fr) minmax(0,1fr) }
.pf-pane { --pf-bg: #1b3128; --pf-ink: #eef2e4; --pf-soft: #a9bcab; position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; border: 1px solid #3d584b; border-radius: 10px; background: var(--pf-bg); color: var(--pf-ink) }
.pf-pane-bar { flex: none; display: flex; align-items: center; justify-content: space-between; gap: .6rem; height: 2.75rem; padding: 0 .9rem; background: #16281f; border-bottom: 1px solid #3d584b; color: var(--pf-soft); font: 600 .78rem/1 ui-monospace,Menlo,monospace; white-space: nowrap }
.pf-pane-bar b { overflow: hidden; color: var(--pf-ink); font-weight: 600; text-overflow: ellipsis }
.pf-scroll { flex: 1 1 0; height: 0; min-height: 0; margin: 0; padding: .85rem 0 1rem; overflow: auto; scrollbar-width: thin; scrollbar-color: #4d6759 transparent; font: 500 clamp(12px,.87vw,12.5px)/1.58 ui-monospace,Menlo,Consolas,monospace; tab-size: 2 }
.pf-scroll:focus-visible { outline: 3px solid #f4ce84; outline-offset: -3px }
.pf-scroll code { display: block; width: max-content; min-width: 100%; font: inherit; white-space: pre }
.pf-pane[data-wrap] .pf-scroll code { width: auto; white-space: pre-wrap; overflow-wrap: anywhere }
.pf-block { display: block; padding: 0 .9rem 0 calc(.9rem - 3px); border-left: 3px solid transparent }
.pf-scroll code:not(:has(.pf-block)) { padding: 0 .9rem }
.pf-block[data-show="later"] { opacity: .5 }
.pf-block[data-show="on"] { border-left-color: #f4ce84; background: #f4ce8424 }
.pf-block.is-quiet { color: var(--pf-soft) }
.pf-c { color: #a9bcab }
.pf-s { color: #f4ce84 }
.pf-k { color: #9fd6bd }
.pf-m { color: #c9dcff }
.pf-n { color: #f1b8a5 }
.pf-f { color: #9fd6bd }
.pf-v { color: #c9dcff }
.pf-prompt { color: var(--pf-soft); user-select: none }
.pf-out { display: block; color: #cfdac9 }
.pf-out[hidden] { display: none }
.pf-block:not(:has(.pf-typed)) .pf-out::before { content: "→ "; color: #f4ce84 }
.pf-block[data-typing] .pf-typed::after { content: ""; display: inline-block; width: .5em; height: 1.05em; margin-left: 1px; vertical-align: text-bottom; background: #f4ce84 }
@media (prefers-reduced-motion: no-preference) { .pf-block { transition: opacity .25s, background-color .2s } }
/* Without scripting the pane prints the whole script and the replay shows its written account. */
@media (scripting: none) {
  .pf-duo { grid-template-columns: minmax(0,1fr) }
  .pf-scroll { flex: none; height: auto; max-height: 30rem }
}

/* ---- Still code, in a card or a section ---- */
.pf-code { min-width: 0; margin: 0; overflow: hidden; border: 1px solid #3d584b; border-radius: 8px; background: #1b3128; color: #eef2e4 }
.pf-code figcaption { padding: .5rem .8rem; background: #16281f; border-bottom: 1px solid #3d584b; color: #a9bcab; font: 600 .75rem/1.3 ui-monospace,Menlo,monospace }
.pf-code pre { margin: 0; padding: .8rem .85rem .9rem; overflow: auto; scrollbar-width: thin; scrollbar-color: #4d6759 transparent; font: 500 .78rem/1.58 ui-monospace,Menlo,Consolas,monospace }
.pf-code pre:focus-visible { outline: 3px solid #f4ce84; outline-offset: -3px }
.pf-code code { font: inherit; white-space: pre }
.pf-code strong { color: #f4ce84; font-weight: 600 }
.pf-code em { color: #a9bcab; font-style: normal }
.hub-page :not(pre) > code { padding: .08em .32em; border-radius: 4px; background: color-mix(in srgb, currentColor 9%, transparent); font: 500 max(.88em,12px)/1.4 ui-monospace,Menlo,Consolas,monospace; overflow-wrap: anywhere }
/* A card whose canvas sits beside its code: the pair stacks when the card is narrow. */
.pf-pair { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,240px),1fr)); align-items: center; gap: clamp(8px,1vw,14px) }
.pf-pair > * { min-width: 0 }
.hub-card-media > .pf-code, .hub-card-media > .stage + .pf-code, .hub-card-media > .pf-code + .stage { margin-top: clamp(8px,1vw,14px) }
.hub-card-media > .pf-code:first-child { margin-top: 0 }
.hub-card-media > .replay { width: 100% }
.hub-card.wide .hub-card-media { align-content: center }
.hub-card.lead .hub-card-media { flex: 1.9 }
.hub-card.flip.wide .hub-card-media { order: 0; border-left: 0; border-right: 1px solid var(--s-line) }
.hub-card .hub-card-copy > ul:not([class]) { margin: 0; padding-left: 1.1rem; color: var(--s-soft); font-size: .95rem }
/* A card that shares a row with a taller one: its canvas area takes the extra height. */
.hub-card.fill .hub-card-media { flex: 1; display: grid; align-content: center }
.pf-code.wrap code { white-space: pre-wrap; overflow-wrap: anywhere }
/* A linked card is covered by its link. The replay's buttons, and any other link, stay above it. */
.hub-card .rp-controls { position: relative; z-index: 1 }
.hub-card .pf-also { position: relative; z-index: 1 }
.pf-also { font-size: .92rem }
.pf-also a { font-weight: 600 }

/* ---- Names: the 17 tools, the commands, the routes ---- */
.pf-tools { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; padding: 0; list-style: none }
.pf-tools li { padding: .22rem .55rem; border: 1px solid var(--s-line); border-radius: 6px; background: color-mix(in srgb, var(--s-card) 70%, transparent); font: 500 .78rem/1.5 ui-monospace,Menlo,Consolas,monospace }
.pf-groups { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,250px),1fr)); gap: clamp(1rem,2.4vw,2.6rem); margin: 0 }
.pf-groups > div { padding-top: .9rem; border-top: 1px solid var(--s-line) }
.pf-groups dt { margin-bottom: .7rem; font: 700 clamp(1.3rem,1.8vw,1.7rem)/1.08 "Archivo Narrow","Arial Narrow",sans-serif; letter-spacing: -.025em }
.pf-groups dd { margin: 0 }
.pf-groups dd > p { margin-top: .7rem; color: var(--s-soft); font-size: .95rem }

/* ---- Tables ---- */
.pf-table { width: 100%; border-collapse: collapse; font-size: .97rem; text-align: left }
.pf-table caption { margin-bottom: .9rem; color: var(--s-soft); font: 600 .82rem/1.4 ui-monospace,Menlo,monospace; text-align: left }
.pf-table :is(th,td) { padding: .85rem 1rem .9rem 0; border-top: 1px solid var(--s-line); vertical-align: top }
.pf-table tr:last-child :is(th,td) { border-bottom: 1px solid var(--s-line) }
.pf-table thead th { border-top: 0; padding-bottom: .7rem; font: 700 clamp(1.3rem,1.8vw,1.7rem)/1.08 "Archivo Narrow","Arial Narrow",sans-serif; letter-spacing: -.025em; vertical-align: bottom }
.pf-table tbody th { width: 30%; font-weight: 600 }
.pf-table td small { display: block; color: var(--s-soft); font-size: .85rem }
.pf-table .yes { font-weight: 600 }
.pf-table .no { color: var(--s-soft) }
.pf-table-note { max-width: 62ch; margin-top: 1.1rem; color: var(--s-soft); font-size: .9rem }
@media (max-width: 800px) {
  /* Short cells stay a table on a phone: the row's name, then one narrow column per plan. */
  .pf-table.tight { table-layout: fixed; font-size: .88rem }
  .pf-table.tight tbody th { width: 46% }
  .pf-table.tight :is(th,td) { padding: .7rem .5rem .7rem 0 }
  .pf-table.tight thead th { font-size: 1.15rem }
  .pf-table.tight thead th:first-child { width: 46%; font-size: .82rem; font-family: ui-monospace,Menlo,monospace; letter-spacing: 0 }
  /* Each row becomes a small block: the row's name, then one line per column with the column's name in front. */
  .pf-table.stack, .pf-table.stack :is(tbody,tr,th,td) { display: block; width: auto }
  .pf-table.stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%) }
  .pf-table.stack tr { padding: .85rem 0 .9rem; border-top: 1px solid var(--s-line) }
  .pf-table.stack tr:last-child { border-bottom: 1px solid var(--s-line) }
  .pf-table.stack :is(th,td) { padding: 0; border: 0 !important }
  .pf-table.stack tbody th { margin-bottom: .35rem; font: 700 1.3rem/1.1 "Archivo Narrow","Arial Narrow",sans-serif; letter-spacing: -.02em }
  .pf-table.stack td { display: grid; grid-template-columns: 5.2rem minmax(0,1fr); gap: .6rem; padding: .16rem 0 }
  .pf-table.stack td::before { content: attr(data-col); color: var(--s-soft); font: 600 .75rem/1.9 ui-monospace,Menlo,monospace }
}

/* ---- Plans ---- */
.pf-prices { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: clamp(12px,1.4vw,22px) }
.pf-price { display: flex; flex-direction: column; gap: .7rem; min-width: 0; padding: clamp(18px,2vw,30px); border: 1px solid var(--s-line); border-radius: 14px; background: var(--s-card) }
.pf-price.featured { border-color: var(--s-ink); box-shadow: 0 14px 30px -24px #17281f99 }
.pf-price h3 { display: flex; align-items: center; justify-content: space-between; gap: .6rem }
.pf-price .pf-amount { font: 700 clamp(2.6rem,4.2vw,4rem)/.95 "Archivo Narrow","Arial Narrow",sans-serif; letter-spacing: -.04em }
.pf-price .pf-amount small { font: 500 .9rem/1.3 "Helvetica Neue",Arial,sans-serif; letter-spacing: 0 }
.pf-price .pf-year { color: var(--s-soft); font-size: .92rem }
.pf-price ul { flex: 1; margin: .4rem 0 .6rem; padding: .9rem 0 0; border-top: 1px solid var(--s-line); list-style: none; font-size: .97rem }
.pf-price li { position: relative; padding: .28rem 0 .28rem 1.3rem }
.pf-price li::before { content: ""; position: absolute; left: .1rem; top: .78em; width: .5rem; height: .5rem; border-radius: 2px; background: var(--hub-deep) }
.pf-price li.more::before { background: none; border: 1.5px solid var(--hub-deep) }
.pf-price > a { align-self: flex-start; font-weight: 600 }
.pf-price > a.button { color: #fff }
.pf-price-foot { margin-top: 1.2rem; color: var(--s-soft); font-size: .9rem }
.pf-prices-table { margin-top: clamp(1.4rem,2.6vw,2.4rem) }
.pf-prices-table table { width: 100%; max-width: 40rem; border-collapse: collapse; font-size: .95rem; text-align: left }
.pf-prices-table caption { margin-bottom: .5rem; color: var(--s-soft); font: 600 .82rem/1.4 ui-monospace,Menlo,monospace; text-align: left }
.pf-prices-table :is(th,td) { padding: .5rem 1rem .5rem 0; border-top: 1px solid var(--s-line) }
.pf-prices-table small { color: var(--s-soft) }

/* ---- A page around an embedded slate ---- */
.pf-doc { min-width: 0; margin: 0; padding: clamp(.8rem,1.4vw,1.2rem); border: 1px solid #b9c2b3; border-radius: 8px; background: #fff; color: #26382d }
.pf-doc > b { display: block; font: 700 1.15rem/1.2 "Helvetica Neue",Arial,sans-serif }
.pf-doc > span { display: block; margin: .3rem 0 .7rem; color: #506356; font-size: .85rem }
.pf-doc .stage { border-radius: 4px }

/* ---- Odds and ends ---- */
/* The shared sheet styles every paragraph in a split or a tab panel. A replay's own lines keep the runner's look. */
.hub-split .replay p, .hub-tabpanel .replay p, .hub-split .stage-body > p, .hub-tabpanel .stage-body > p { max-width: none; margin-top: 0 }
.hub-split .replay .rp-status, .hub-tabpanel .replay .rp-status { color: var(--rp-ink) }
.hub-split .replay .rp-label, .hub-tabpanel .replay .rp-label { color: var(--rp-soft) }
.hub-split .stage-body > p, .hub-tabpanel .stage-body > p { color: inherit }
.pf-quote { margin: 1.2rem 0 0; padding: 0 0 0 1rem; border-left: 3px solid var(--s-line); font-size: .95rem }
.pf-quote footer { margin-top: .35rem; font: 500 .78rem/1.4 ui-monospace,Menlo,monospace }
.pf-license { max-width: 54rem; margin: 0 auto; font: 700 clamp(1.7rem,3vw,3rem)/1.08 "Archivo Narrow","Arial Narrow",sans-serif; letter-spacing: -.03em; text-wrap: balance }
.pf-links { display: flex; flex-wrap: wrap; gap: .6rem 1.6rem; margin-top: 1.4rem }
.pf-links a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600 }
.hub-statement .pf-links { justify-content: center }
.hub-section[data-tone="ink"] .pf-code, .hub-section[data-tone="ink"] .pf-pane { border-color: #4d6759; background: #16281f }
.hub-section[data-tone="ink"] .pf-code figcaption { background: #10201a }
.hub-rows i { font-style: normal }
#create-a-slate { scroll-margin-top: clamp(3rem,6vw,6.5rem) }
.pf-after { margin-top: 1.3rem; color: var(--s-soft); font-size: .95rem }
.pf-after a { font-weight: 600 }
.hub-steps .pf-code { margin-top: .9rem }
.hub-split .pf-code { margin-top: 1.2rem }
.hub-split .hub-points code, .hub-facts code { overflow-wrap: anywhere }
.hub-steps li { min-width: 0 }
.hub-hero-copy .hub-crumbs { display: flex; flex-wrap: wrap }
/* Step chips in a card or beside a pane: one row of words is enough. */
.pf-duo .replay { --rp-label-narrow: 3.06rem }

@media (max-width: 1100px) {
  .pf-duo { grid-template-columns: minmax(0,1fr) }
  .pf-duo .pf-scroll { flex: none; height: 11.4rem }
}
@media (max-width: 800px) {
  .hub-page .stage .stage-body[style*="--stage-ratio-narrow"] { aspect-ratio: var(--stage-ratio-narrow) }
  .pf-duo .pf-scroll { height: 8.3rem; padding-block: .6rem; font-size: .75rem }
  .pf-pane-bar { height: 2.3rem }
  .pf-prices { grid-template-columns: minmax(0,1fr) }
  .hub-card.flip.wide .hub-card-media { border-right: 0 }
  .pf-code pre { font-size: .75rem }
}
