@view-transition { navigation: auto; }

body { margin: 0; font-family: "Host Grotesk", sans-serif; color: #000; -webkit-font-smoothing: antialiased; }

/* Standalone page gets its own bg; overlay mode supplies its own white container */
body:not(.hiw-overlay-mode) .hiw-page { background: #ffffff; min-height: 100vh; }

.hiw-page { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 10px 10px 140px; min-height: 100vh; box-sizing: border-box; }

/* the close button stays put as the page scrolls: the header row sticks where it sits at the top,
   and only the button itself takes clicks */
.hiw-header { position: sticky; top: 10px; z-index: 50; pointer-events: none; max-width: 1280px; width: 100%; height: 100px; display: flex; justify-content: flex-end; align-items: center; padding-right: 30px; box-sizing: border-box; }
.hiw-header > * { pointer-events: auto; }

.hiw-close { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; background: #ffffff; border: 1.838px solid rgba(0,0,0,0.1); border-radius: 16px; box-shadow: 0 14.703px 58.811px -4px rgba(0,0,0,0.1); overflow: hidden; text-decoration: none; flex-shrink: 0; transition: opacity 0.15s ease; }

.hiw-close:hover { opacity: 0.7; }

/* content column: title block + body, 30px apart */
.hiw-content { display: flex; flex-direction: column; gap: 30px; align-items: flex-start; width: 100%; max-width: 800px; }

/* title block carries the 60px gap down to the body */
.hiw-title-block { padding-bottom: 60px; }

.hiw-title { font-size: 50px; font-weight: 500; line-height: 1.2; letter-spacing: 0; color: #000; margin: 0; }

/* body stack: text group, tools group, footer — 55px apart */
.hiw-body { width: 100%; max-width: 800px; display: flex; flex-direction: column; gap: 55px; }

/* paragraphs spaced 45px apart */
.hiw-text { display: flex; flex-direction: column; gap: 45px; }

.hiw-para { font-size: 22px; line-height: 1.3; color: #000; margin: 0; font-weight: 400; }

.hiw-bold { font-weight: 700; }

/* tools group: heading + list, 29px apart */
.hiw-tools { display: flex; flex-direction: column; gap: 29px; }

.hiw-tools-heading { font-size: 35px; font-weight: 700; line-height: 1.2; color: #000; margin: 0; }

/* nowrap on pointer devices: an expanding pill pushes neighbours along the
   row instead of wrapping to a new line — wrapping is what caused the hover
   flicker loop (pill wraps away from the cursor → un-hovers → collapses → repeats) */
.tool-list { display: flex; flex-direction: row; flex-wrap: nowrap; gap: 25px; align-items: center; padding-top: 10px; }

/* each tool: a 50px circle that morphs into a pill on hover.
   flex-shrink:0 keeps circles perfectly round and stops the row from squishing
   them when an expanded pill overflows a narrow container */
.tool { flex-shrink: 0; display: inline-flex; align-items: center; height: 50px; background: #ebeeed; border-radius: 25px; overflow: hidden; padding: 0; transition: padding-right 0.3s ease;
  /* it's a <button>: reset the browser's button styles so it looks like the original pill */
  border: 0; margin: 0; font: inherit; color: inherit; cursor: pointer; -webkit-appearance: none; appearance: none; -webkit-tap-highlight-color: transparent; }

.tool__icon { width: 50px; height: 50px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }

.tool__icon .ic { display: block; }

/* per-icon sizing within the 50px circle (aspect-preserving) */
.ic-claude { width: 29px; height: 29px; }
.ic-claude-code { width: 34px; height: 21.25px; }
.ic-figma { width: 18.433px; height: 27.648px; }
.ic-cursor { width: 26px; height: 30px; }
.ic-acrolinx { width: 28.686px; height: 25px; }

/* label reveals by animating its grid track from 0fr to 1fr */
.tool__label { display: grid; grid-template-columns: 0fr; transition: grid-template-columns 0.3s ease; }

.tool__label > span { overflow: hidden; min-width: 0; white-space: nowrap; font-family: "Host Grotesk", sans-serif; font-weight: 700; font-size: 22px; line-height: 1.4; color: #000; opacity: 0; transition: opacity 0.2s ease; }

/* open: hover with a mouse; .is-open from a tap or the keyboard (assets/how-i-work.js).
   Hover is limited to mouse devices so a tap doesn't leave a pill stuck open. */
.tool.is-open { padding-right: 20px; }
.tool.is-open .tool__label { grid-template-columns: 1fr; }
.tool.is-open .tool__label > span { opacity: 1; }
@media (hover: hover) {
  .tool:hover { padding-right: 20px; }
  .tool:hover .tool__label { grid-template-columns: 1fr; }
  .tool:hover .tool__label > span { opacity: 1; }
}
.tool:focus-visible { outline: 2px solid #000; outline-offset: 3px; }

/* VS Code icon — CSS masking composite, sized to 25px */
.vscode-wrap { position: relative; width: 25px; height: 25px; overflow: hidden; }

.vscode-layer { position: absolute; top: 0; left: 0; width: 25px; height: 25px; -webkit-mask-size: 25px 25px; mask-size: 25px 25px; -webkit-mask-position: 0 0; mask-position: 0 0; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-image: url(../../assets/icons/vscode-mask.svg); mask-image: url(../../assets/icons/vscode-mask.svg); background-size: 25px 25px; background-position: 0 0; background-repeat: no-repeat; }

.vscode-top { background-image: url(../../assets/icons/vscode-top.svg); }
.vscode-bot { background-image: url(../../assets/icons/vscode-bot.svg); }
.vscode-right { background-image: url(../../assets/icons/vscode-right.svg); }
.vscode-overlay { background-image: url(../../assets/icons/vscode-overlay.svg); mix-blend-mode: overlay; }

.hiw-footer { font-size: 22px; font-weight: 300; line-height: 1.6; color: #000; margin: 0; }

@media (max-width: 860px) {
  .hiw-page { padding: 0 16px 48px; gap: 0; }
  .hiw-header { top: 0; height: 64px; padding-right: 0; } /* the page already has 16px side padding */
  .hiw-content { gap: 16px; }
  .hiw-title-block { padding-bottom: 24px; }
  .hiw-title { font-size: 32px; }
  .hiw-body { gap: 28px; }
  .hiw-text { gap: 20px; }
  .hiw-para { font-size: 18px; line-height: 1.5; }
  .hiw-tools { gap: 18px; }
  .hiw-tools-heading { font-size: 24px; }
  .hiw-footer { font-size: 16px; }
  .tool-list { gap: 14px; }
}

/* The two .tool-row groups don't affect layout by default: all six sit in one row. */
.tool-row { display: contents; }

/* Touch devices: pills open on tap rather than hover, so there's no hover-flicker
   loop — let the circles wrap so all six (and an open pill) fit. */
@media (hover: none) {
  .tool-list { flex-wrap: wrap; }
}

/* Phones: two rows of three. Each row has room for any one name to open (even
   "Claude Code"), so a tapped pill never jumps to another line out from under the
   finger — it only nudges the icons after it in its own row. */
@media (hover: none) and (max-width: 600px) {
  .tool-list { flex-direction: column; align-items: flex-start; gap: 14px; }
  .tool-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
}
