/* Works with: /with/ and /with/<tool>/ (site/src/with.mjs). Tokens only.
   Two registers in every picture. Another product's UI is borrowed (.bw):
   greys, flat, one hairline, a lower contrast, no serif, no channel, its own
   mark in the bar. Seamside's is drawn in full (.sw): surface and shadow,
   the orb, the serif title, channel color. */

/* ---- /with/: the tools, grouped by the two ways in ---- */
.w-hero { padding-bottom: 0; }
.w-groups { display: flex; flex-direction: column; margin-top: 64px; border-top: 1px solid var(--os-border-color-subtle); }
.w-group { display: grid; grid-template-columns: 1fr; gap: var(--os-sp-lg); align-items: start; padding: var(--os-sp-xl) 0; border-bottom: 1px solid var(--os-border-color-subtle); }
.w-group-h { display: flex; align-items: center; gap: var(--os-sp-md); justify-self: start; text-decoration: none; }
.w-group-h b { font-size: var(--os-fs-lg); font-weight: 600; letter-spacing: -0.01em; }
.w-jump { font-size: var(--os-fs-md); color: var(--os-text-muted); transition: color var(--os-transition-fast); }
.w-jump::after { content: '→'; display: inline-block; margin-left: 4px; transition: transform var(--os-transition-normal) var(--os-ease-spring); }
.w-group-h:hover .w-jump { color: var(--os-text); }
.w-group-h:hover .w-jump::after { transform: translateX(3px); }
.w-tile { display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--os-radius-md); background: var(--ch); color: var(--ch-fg); font-size: 22px; }

.w-list { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--os-sp-sm); }
.w-tool { display: flex; align-items: center; gap: var(--os-sp-md); min-width: 0; padding: 10px; border-radius: var(--os-radius-lg); text-decoration: none; transition: background var(--os-transition-fast); }
.w-tool:hover { background: var(--os-bg-subtle); }
.w-tool > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.w-tool b { font-size: var(--os-fs-md); font-weight: 500; }
.w-tool small { font-size: var(--os-fs-sm); color: var(--os-text-muted); line-height: 1.35; }
.w-others { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ---- a way in ---- */
.w-way { padding-top: 160px; scroll-margin-top: 24px; }
.w-top { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 72px; align-items: center; }
#ai .w-top { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); }
#ai .w-top .mo { order: -1; }
.w-kick { display: flex; align-items: center; gap: var(--os-sp-md); margin: 0; font-size: var(--os-fs-md); font-weight: 500; color: var(--os-text-secondary); }
.w-kick .w-tile { width: 32px; height: 32px; font-size: 18px; }
.w-line { margin: 20px 0 0; font-family: var(--os-font-serif); font-weight: 700; letter-spacing: -0.024em; line-height: 1.04; font-size: clamp(36px, 1.2rem + 2.6vw, 58px); text-wrap: balance; }
.w-p { margin: var(--os-sp-xl) 0 0; font-size: clamp(17px, 1rem + 0.25vw, 19px); line-height: 1.55; color: var(--os-text-secondary); text-wrap: pretty; }
.w-instead { display: flex; flex-wrap: wrap; align-items: center; gap: var(--os-sp-sm); margin: var(--os-sp-xl) 0 0; font-size: var(--os-fs-md); color: var(--os-text-muted); }
.w-instead span { margin-right: var(--os-sp-xs); }
.w-instead s { font-family: var(--os-font-mono); font-size: var(--os-fs-sm); padding: 2px 8px; border-radius: var(--os-radius-xs); background: var(--os-bg-inset); color: var(--os-text-muted); text-decoration-color: var(--os-text-secondary); }

/* what it takes: the real steps */
.w-how { margin-top: 64px; padding-top: var(--os-sp-2xl); border-top: 1px solid var(--os-border-color-subtle); }
.w-how.bare { margin-top: 40px; padding-top: 0; border-top: 0; }
.w-how > .label { margin: 0 0 var(--os-sp-xl); }
.w-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--os-sp-2xl); counter-reset: w; }
.w-steps li { display: flex; flex-direction: column; gap: var(--os-sp-xs); min-width: 0; }
.w-steps li::before { counter-increment: w; content: counter(w); display: grid; place-items: center; width: 26px; height: 26px; margin-bottom: 10px; border-radius: 50%; background: var(--ch); color: var(--ch-fg); font-size: var(--os-fs-sm); font-weight: 600; }
.w-steps b { font-size: var(--os-fs-lg); font-weight: 600; }
.w-steps span { font-size: var(--os-fs-md); color: var(--os-text-secondary); text-wrap: pretty; }
.w-steps .code { margin-top: var(--os-sp-md); font-size: var(--os-fs-sm); overflow-wrap: anywhere; }
.w-foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--os-sp-sm) var(--os-sp-md); margin-top: 40px; }
.w-guide-l { font-size: var(--os-fs-md); color: var(--os-text-muted); }
.w-guides { display: flex; flex-wrap: wrap; gap: var(--os-sp-sm); }
.w-guides a { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px 5px 10px; border-radius: var(--os-radius-full); border: 1px solid var(--os-border-color); font-size: var(--os-fs-base); color: var(--os-text-secondary); text-decoration: none; transition: color var(--os-transition-fast), border-color var(--os-transition-fast); }
.w-guides a:hover { color: var(--os-text); border-color: var(--os-text-muted); }
.w-mk { display: flex; }
.w-mk svg { width: 14px; height: 14px; }
.w-also { flex-basis: 100%; margin: var(--os-sp-sm) 0 0; font-size: var(--os-fs-md); color: var(--os-text-muted); }
.w-also .arrow { color: var(--os-text); margin-left: 4px; }

/* ---- a tool's own page ---- */
.w-hero-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 64px; align-items: center; padding-top: 88px; }
.w-hero-2 .display { font-size: clamp(38px, 1.3rem + 2.5vw, 58px); }
.w-gets { list-style: none; display: flex; flex-wrap: wrap; gap: var(--os-sp-md) 40px; margin: 64px 0 0; padding: var(--os-sp-xl) 0 0; border-top: 1px solid var(--os-border-color-subtle); }
.w-gets li { display: inline-flex; align-items: center; gap: var(--os-sp-sm); font-size: var(--os-fs-md); color: var(--os-text-secondary); }
.w-gets i { font-size: 20px; color: var(--ch); }

/* ---- the pictures ---- */
.mo { position: relative; margin: 0; aspect-ratio: 11 / 9; border-radius: var(--os-radius-2xl); overflow: hidden; border: 1px solid var(--os-border-color-subtle);
  background: radial-gradient(70% 60% at 88% 92%, color-mix(in srgb, var(--ch), transparent 72%), transparent 72%), var(--os-bg-subtle);
  font-size: var(--os-fs-base); line-height: 1.4; color: var(--os-text); user-select: none; }
#ai .mo, .mo-ai { background: radial-gradient(60% 70% at 90% 88%, color-mix(in srgb, var(--ch), transparent 70%), transparent 72%), var(--os-bg-subtle); }

/* borrowed: flat, grey, a hairline, the product's mark */
.bw { position: absolute; display: flex; flex-direction: column; overflow: hidden; border-radius: var(--os-radius-md); border: 1px solid var(--os-border-color); background: color-mix(in srgb, var(--os-text) 3%, var(--os-bg)); color: var(--os-text-secondary); font-family: var(--os-font-sans); }
.bw-bar { flex: none; display: flex; align-items: center; gap: var(--os-sp-sm); height: 32px; padding: 0 12px; border-bottom: 1px solid var(--os-border-color-subtle); font-size: var(--os-fs-sm); font-weight: 500; color: var(--os-text-secondary); }
.bw-bar em { font-style: normal; font-weight: 400; color: var(--os-text-muted); }
.bw-bar em::before { content: '/'; margin-right: var(--os-sp-sm); color: var(--os-border-color); }
.bw-mk { display: flex; }
.bw-mk svg { width: 14px; height: 14px; }
.bw b { font-weight: 500; color: var(--os-text-secondary); }
.bw small { color: var(--os-text-muted); font-size: var(--os-fs-xs); }

.bw-app { display: flex; flex-direction: column; gap: 6px; padding: 16px 16px 72px; opacity: 0.45; }
.bw-app > b { font-size: var(--os-fs-md); margin-bottom: 4px; }
.bw-item { display: flex; align-items: center; gap: var(--os-sp-sm); padding: 7px 8px; border-radius: var(--os-radius-xs); border: 1px solid var(--os-border-color-subtle); font-size: var(--os-fs-xs); }
.bw-item i { width: 16px; height: 16px; border-radius: var(--os-radius-xs); background: var(--os-border-color); }
.bw-dialog { position: absolute; left: 50%; top: 44%; transform: translate(-50%, -50%); width: min(19rem, 82%); display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: var(--os-radius-md); border: 1px solid var(--os-border-color); background: var(--os-bg); font-size: var(--os-fs-sm); }
.bw-dialog b { font-size: var(--os-fs-md); font-weight: 600; }
.bw-btns { display: flex; gap: var(--os-sp-sm); margin-top: 6px; }
.bw-btns > i { position: relative; font-style: normal; padding: 5px 10px; border-radius: var(--os-radius-xs); background: color-mix(in srgb, var(--os-text) 12%, transparent); color: var(--os-text-muted); }
.bw-btns > i.pick { background: transparent; box-shadow: inset 0 0 0 1px var(--os-text-muted); color: var(--os-text-secondary); }
.bw-btns .pick i { position: absolute; right: -12px; bottom: -15px; font-size: 20px; color: var(--os-text); }

.bw-chat { flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 16px; font-size: var(--os-fs-sm); }
.bw-chat p { margin: 0; }
.bw-chat .me { align-self: flex-end; max-width: 86%; padding: 7px 11px; border-radius: var(--os-radius-md); background: color-mix(in srgb, var(--os-text) 7%, transparent); color: var(--os-text-secondary); }
.bw-art { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: var(--os-radius-sm); border: 1px solid var(--os-border-color); }
.bw-art > i { font-size: 20px; color: var(--os-text-muted); }
.bw-art > span { display: flex; flex-direction: column; }
.bw-chip, .bw-tool { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: var(--os-radius-xs); border: 1px solid var(--os-border-color-subtle); font-family: var(--os-font-mono); font-size: var(--os-fs-2xs); color: var(--os-text-muted); }
.bw-chip i, .bw-tool i { font-size: 13px; }
.bw-tool em { font-style: normal; }
.bw-tool em::before { content: '·'; margin-right: 6px; }
.bw-ask { align-self: stretch; margin-top: auto; padding: 8px 12px; border-radius: var(--os-radius-md); border: 1px solid var(--os-border-color); color: var(--os-text-muted); }
.bw-url { font-family: var(--os-font-mono); font-size: var(--os-fs-xs); color: var(--os-text-secondary); text-decoration: underline; text-decoration-color: var(--os-text-muted); text-underline-offset: 3px; }
.bw-split { flex: 1; display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); }
.bw-split .bw-chat { border-left: 1px solid var(--os-border-color-subtle); }
.bw-code { display: flex; flex-direction: column; gap: 9px; padding: 18px 14px; }
.bw-code i { display: block; height: 5px; border-radius: 3px; background: color-mix(in srgb, var(--os-text) 11%, transparent); }

/* the file, on its way across */
.mo-file { position: absolute; left: 11%; top: 60%; z-index: 2; display: flex; align-items: center; gap: 10px; padding: 10px 16px 10px 12px; border-radius: var(--os-radius-md); background: var(--os-bg-elevated); border: 1px solid var(--os-border-color-subtle); box-shadow: var(--os-shadow-md); transform: rotate(-4deg); animation: mo-bob 6s var(--os-ease-out) infinite; }
.mo-file > i { font-size: 28px; color: var(--os-text-secondary); }
.mo-file span { display: flex; flex-direction: column; font-weight: 500; }
.mo-file small { font-size: var(--os-fs-2xs); font-weight: 400; color: var(--os-text-muted); font-variant-numeric: tabular-nums; }
@keyframes mo-bob { 50% { transform: rotate(-2deg) translateY(-6px); } }

/* Seamside, in full */
.sw { position: absolute; display: flex; flex-direction: column; overflow: hidden; border-radius: var(--os-radius-lg); background: var(--os-bg-surface); border: 1px solid var(--os-border-color-subtle); box-shadow: var(--os-shadow-xl); }
.sw-bar { flex: none; display: flex; align-items: center; gap: var(--os-sp-sm); height: 34px; padding: 0 12px; border-bottom: 1px solid var(--os-border-color-subtle); font-size: var(--os-fs-sm); font-weight: 500; color: var(--os-text-secondary); }
.sw-bar magic-orb { width: 16px; height: 16px; }
.sw-body { display: flex; flex-direction: column; padding: 14px 16px 16px; }
.sw-title { margin: 0 0 6px; font-family: var(--os-font-serif); font-weight: 700; font-size: var(--os-fs-xl); letter-spacing: -0.01em; line-height: 1.2; }
.sw-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--os-border-color-subtle); }
.sw-row > span:nth-child(2) { display: flex; flex-direction: column; min-width: 0; }
.sw-row b { font-weight: 500; }
.sw-row small { font-size: var(--os-fs-xs); color: var(--os-text-muted); }
.sw-app { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: var(--os-radius-sm); background: var(--ch); color: var(--ch-fg); font-size: 17px; }
.sw-app.dim { background: var(--os-bg-inset); color: var(--os-text-muted); }
.sw-pub { margin-left: auto; font-style: normal; font-size: var(--os-fs-2xs); font-weight: 500; padding: 2px 8px; border-radius: var(--os-radius-full); background: color-mix(in srgb, var(--os-cSuccess), transparent 85%); color: var(--os-cSuccess); }
.sw-link { display: flex; align-items: center; gap: var(--os-sp-sm); margin-top: 6px; padding: 4px 4px 4px 10px; border-radius: var(--os-radius-sm); background: var(--os-bg-inset); }
.sw-link code { flex: 1; min-width: 0; font-family: var(--os-font-mono); font-size: var(--os-fs-xs); color: var(--os-text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sw-btn { display: inline-flex; align-items: center; gap: 5px; flex: none; padding: 5px 10px; border-radius: var(--os-radius-xs); background: var(--os-cSuccess); color: var(--os-cSuccess-fg); font-size: var(--os-fs-xs); font-weight: 500; }

/* the thing, opened by the person it was sent to */
.sw-phone { position: absolute; display: flex; flex-direction: column; gap: 10px; padding: 12px 10px 44px; border-radius: 28px; background: var(--os-bg-surface); border: 6px solid var(--os-bg-inset); box-shadow: var(--os-shadow-xl), 0 0 0 1px var(--os-border-color); }
.sw-addr { display: flex; align-items: center; justify-content: center; gap: 4px; padding: 5px; border-radius: var(--os-radius-full); background: var(--os-bg-inset); font-size: var(--os-fs-2xs); color: var(--os-text-secondary); }
.sw-made { display: grid; gap: 6px; padding: 6px 4px; }
.sw-made > b { font-family: var(--os-font-serif); font-weight: 700; font-size: var(--os-fs-lg); margin-bottom: 2px; }
.sw-bill { display: flex; justify-content: space-between; font-size: var(--os-fs-xs); color: var(--os-text-muted); padding: 5px 0; border-top: 1px solid var(--os-border-color-subtle); }
.sw-bill em { font-style: normal; color: var(--os-text); font-variant-numeric: tabular-nums; }
.sw-each { margin-top: 8px; padding: 12px 8px; border-radius: var(--os-radius-md); background: var(--ch); color: var(--ch-fg); text-align: center; font-weight: 600; font-size: var(--os-fs-xl); font-variant-numeric: tabular-nums; }
.sw-each small { display: block; font-size: var(--os-fs-2xs); font-weight: 500; opacity: 0.8; }
/* the viewer's badge on a seated frame, at phone scale: the orb in a raised disc in a corner */
.sw-pill { position: absolute; left: 10px; bottom: 10px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: var(--os-radius-full); background: var(--os-bg-elevated); border: 1px solid var(--os-border-color); box-shadow: var(--os-shadow-md); }
.sw-pill magic-orb { width: 14px; height: 14px; display: block; }

/* where each piece sits */
.mo-build .mo-src { left: 5%; top: 6%; width: 70%; bottom: 32%; }
.mo-build .mo-dest { right: 5%; bottom: 6%; width: 56%; }
.mo-ai .mo-src { left: 5%; top: 6%; bottom: 6%; width: 57%; }
.w-hero-2 .mo { aspect-ratio: 1; }
.w-hero-2 .mo-build .mo-src { bottom: 40%; }
.w-hero-2 .mo-build .mo-file { top: 52%; }
.mo-ai .mo-dest { right: 6%; bottom: 7%; width: 24%; aspect-ratio: 9 / 18; }

@media (prefers-reduced-motion: reduce) {
  .mo-file { animation: none; }
  .w-jump::after { transition: none; }
}

@media (max-width: 60rem) {
  .w-group { grid-template-columns: 1fr; gap: var(--os-sp-md); }
  .w-list, .w-others { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--os-sp-xs); }
  .w-way { padding-top: 112px; }
  .w-top, #ai .w-top { grid-template-columns: 1fr; gap: 40px; }
  #ai .w-top .mo { order: 0; }
  .w-steps { grid-template-columns: 1fr; gap: var(--os-sp-xl); }
  .w-steps li { display: grid; grid-template-columns: 26px 1fr; column-gap: 14px; row-gap: 2px; }
  .w-steps li::before { grid-row: span 3; margin: 0; }
  .w-steps li > * { grid-column: 2; }
  .w-hero-2 { grid-template-columns: 1fr; gap: 48px; padding-top: 64px; }
}
@media (max-width: 36rem) {
  .w-tool { padding: 8px 6px; }
  .w-tool .tile { width: 34px; height: 34px; }
  /* the picture stacks: where you are, what moves, where it lands */
  .mo { aspect-ratio: auto; display: flex; flex-direction: column; padding: 16px; font-size: var(--os-fs-sm); }
  .mo .bw, .mo .sw, .mo .sw-phone, .mo .mo-file { position: relative; inset: auto; width: auto; }
  .mo-build .bw-app { padding-bottom: 96px; }
  .mo-file { align-self: flex-start; margin: -22px 0 -10px 18px; }
  .mo-build .mo-dest { margin-left: 10%; }
  .mo-ai .bw-split { grid-template-columns: 1fr; }
  .mo-ai .bw-code { display: none; }
  .mo-ai .bw-split .bw-chat { border-left: 0; }
  .mo-ai .bw-chat { padding-bottom: 56px; }
  .mo-ai .mo-dest { align-self: flex-end; width: 62%; margin-top: -40px; margin-right: 4px; }
}

/* the MCP tag beside the AI row, as home's Connect your AI door carries it */
.w-tag { display: inline-block; vertical-align: 2px; margin-left: var(--os-sp-sm); font-family: var(--os-font-mono); font-size: var(--os-fs-2xs); font-weight: var(--os-weight-medium);
  letter-spacing: 0.06em; padding: 1px var(--os-sp-xs); border-radius: var(--os-radius-xs); color: var(--ch); background: color-mix(in srgb, var(--ch), transparent 84%); }
/* the catch-all in each row: the tools named are examples */
.w-any .tile { background: transparent; border: 1px dashed var(--os-border-color); color: var(--os-text-secondary); }
