/* How it works (/how/). Tokens only. Five beats, each a serif line, a
   sentence or two and one drawn moment. The pictures sit on a neutral ground
   so that colour belongs to Seamside alone: another product's window
   (.hw-other) is grey, flat and a step quieter, with its own mark in its bar;
   Seamside's (.hw-ours, .hw-menu, .hw-drawer) is drawn in full. */

/* ---- hero ---- */
.hw-hero .lede { max-width: 40rem; text-wrap: pretty; }
.hw-hero .lede br { display: none; }
@media (min-width: 40rem) { .hw-hero .lede br { display: block; } }
.hw-index { display: flex; flex-wrap: wrap; gap: var(--os-sp-sm); margin-top: 40px; }
.hw-index a { padding: 6px 14px; border-radius: var(--os-radius-full); border: 1px solid var(--os-border-color); font-size: var(--os-fs-md); color: var(--os-text-secondary); text-decoration: none; transition: color var(--os-transition-fast), border-color var(--os-transition-fast); }
.hw-index a:hover { color: var(--os-text); border-color: var(--os-text-muted); }

/* ---- a beat ---- */
.hw-beat { padding-top: 144px; scroll-margin-top: 32px; }
.hw-hero + .hw-beat { padding-top: 120px; }
.hw-cols { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 72px; align-items: center; }
.hw-beat.flip .hw-cols { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.hw-beat.flip .hw-say { order: 2; }
.hw-say .label { margin: 0 0 var(--os-sp-lg); }
.hw-say .h2 { font-size: clamp(32px, 1.1rem + 1.9vw, 46px); }
.hw-p { margin: 24px 0 0; font-size: clamp(17px, 1rem + 0.25vw, 19px); line-height: 1.55; color: var(--os-text-secondary); max-width: 30rem; text-wrap: pretty; }
.hw-deeper { margin: 28px 0 0; font-size: var(--os-fs-md); }
/* Conjure is a fourth way in, not a fifth pillar: the same beat, smaller. */
.hw-beat.minor .h2 { font-size: clamp(28px, 1rem + 1.4vw, 38px); }
.hw-beat.minor .hw-pic { aspect-ratio: 16 / 10; }

/* ---- the pictures: a neutral ground, windows on it ---- */
.hw-pic { position: relative; margin: 0; aspect-ratio: 6 / 5; border-radius: var(--os-radius-2xl); overflow: hidden; background: var(--os-bg-subtle); border: 1px solid var(--os-border-color-subtle);
  font-size: var(--os-fs-base); line-height: 1.4; color: var(--os-text); user-select: none; }
.hw-pic h4 { margin: 0; font-family: var(--os-font-serif); font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; }
.hw-pic b { font-weight: 500; }

/* Borrowed: another product. Grey, flat, a hairline, a step lower in contrast. */
.hw-other { position: absolute; display: flex; flex-direction: column; overflow: hidden; background: var(--os-bg-surface); border: 1px solid var(--os-border-color); border-radius: var(--os-radius-md); box-shadow: none; color: var(--os-text-muted); }
.hw-other b { color: var(--os-text-secondary); font-weight: 400; }
.hw-other i.ph-light { color: var(--os-text-muted); }
.hw-obar { flex: none; display: flex; align-items: center; gap: 5px; height: 28px; padding: 0 10px; border-bottom: 1px solid var(--os-border-color-subtle); background: var(--os-bg-subtle); }
.hw-obar > i { width: 8px; height: 8px; border-radius: 50%; border: 1px solid var(--os-border-color); }
.hw-obar > span { display: flex; align-items: center; gap: 6px; margin-left: 8px; font-size: var(--os-fs-xs); color: var(--os-text-muted); }
.hw-obar .ph-light { font-size: 14px; }

/* Seamside: its lift, its channels, its serif, its orb in the bar. */
.hw-ours { position: absolute; display: flex; flex-direction: column; overflow: hidden; background: var(--os-bg-elevated); border: 1px solid var(--os-border-color-subtle); border-radius: var(--os-radius-lg); box-shadow: var(--os-shadow-xl); }
.hw-bar { flex: none; display: flex; align-items: center; gap: 8px; 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); }
.hw-bar magic-orb { width: 14px; height: 14px; }
.hw-face { display: inline-grid; place-items: center; flex: none; width: 22px; height: 22px; border-radius: 50%; font-style: normal; font-size: 10px; font-weight: 600; background: var(--f); color: var(--ff); }
.hw-tile { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: var(--os-radius-sm); background: var(--t); color: var(--tf); font-size: 16px; }
.hw-meta { margin: 4px 0 0; font-size: var(--os-fs-xs); color: var(--os-text-muted); font-variant-numeric: tabular-nums; }
.hw-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--os-border-color-subtle); font-size: var(--os-fs-sm); }
.hw-row > .ph-light { width: 28px; text-align: center; font-size: 18px; color: var(--os-text-secondary); }
.hw-row small { margin-left: auto; font-size: var(--os-fs-2xs); color: var(--os-text-muted); font-variant-numeric: tabular-nums; }
.hw-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); }
.hw-glabel { margin: 16px 0 4px; font-size: var(--os-fs-2xs); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; color: var(--os-text-muted); }
.hw-glabel + .hw-row { border-top: 0; }

/* 1 · the menu bar */
.hw-osbar { position: absolute; left: 0; right: 0; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; height: 32px; padding: 0 16px; background: var(--os-bg-surface); border-bottom: 1px solid var(--os-border-color); font-size: var(--os-fs-sm); color: var(--os-text-muted); }
.hw-os-l, .hw-os-r { display: flex; align-items: center; gap: 16px; }
.hw-os-l b { color: var(--os-text-secondary); font-weight: 600; }
.hw-osbar .ph-light { font-size: 15px; }
.hw-orbhit { position: relative; display: grid; place-items: center; width: 28px; height: 24px; border-radius: var(--os-radius-sm); background: var(--os-bg-inset); }
.hw-browser { left: 6%; top: 15%; width: 74%; bottom: -4%; }
.hw-obar svg { width: 13px; height: 13px; }
/* Seamside's home as the browser shows it, drawn as a wireframe: this window is the browser's */
.hw-url { display: flex; align-items: center; gap: 6px; margin: 8px 10px 0; padding: 4px 10px; border-radius: var(--os-radius-full); background: var(--os-bg-subtle); font-size: var(--os-fs-2xs); }
.hw-url .ph-light { font-size: 11px; }
.hw-wire { padding: 22px 24px; }
.hw-wh { display: block; width: 38%; height: 14px; border-radius: var(--os-radius-xs); background: var(--os-border-color); }
.hw-wgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 18px; }
.hw-wgrid i { aspect-ratio: 1; border-radius: var(--os-radius-md); border: 1px dashed var(--os-border-color); }
.hw-wgrid i.w2 { grid-column: span 2; aspect-ratio: auto; }
/* anchored under the orb: PRECISION's anchored menu */
.hw-menu { position: absolute; z-index: 3; top: calc(100% + 5px); right: -10px; width: 15rem; color: var(--os-text); display: flex; flex-direction: column; padding: 4px; background: var(--os-bg-elevated); border: 1px solid var(--os-border-color); border-radius: var(--os-radius-md); box-shadow: var(--os-shadow-xl); font-size: var(--os-fs-base); }
.hw-mi { display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 10px; border-radius: var(--os-radius-sm); }
.hw-mi.on { background: var(--os-c1); color: var(--os-c1-fg); }
.hw-mi em { margin-left: auto; font-style: normal; color: var(--os-text-secondary); }
.hw-mi .hw-face { width: 18px; height: 18px; font-size: 9px; }
.hw-menu hr { width: calc(100% - 20px); margin: 4px 10px; border: 0; border-top: 1px solid var(--os-border-color-subtle); }

/* 2 · a space: the folder, and the page */
.hw-finder { left: 6%; top: 8%; width: 58%; }
.hw-flist { display: flex; flex-direction: column; padding: 6px 12px 10px; }
.hw-flist span { display: flex; align-items: center; gap: 8px; padding: 7px 2px; border-top: 1px solid var(--os-border-color-subtle); font-size: var(--os-fs-sm); color: var(--os-text-secondary); }
.hw-flist span:first-child { border-top: 0; }
.hw-flist .ph-light { font-size: 16px; }
.hw-flist small { margin-left: auto; font-size: var(--os-fs-2xs); color: var(--os-text-muted); }
.hw-spacepage { right: 6%; bottom: 7%; width: 62%; }
.hw-sp { padding: 18px 20px 14px; }
.hw-sp-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hw-sp-head h4 { font-size: var(--os-fs-2xl); }
.hw-faces { display: inline-flex; }
.hw-faces .hw-face { margin-left: -6px; box-shadow: 0 0 0 2px var(--os-bg-elevated); }
.hw-faces .hw-face:first-child { margin-left: 0; }

/* 3 · sharing: the panel, the role menu, the link opened on a phone */
.hw-panel { left: 6%; top: 7%; width: 56%; z-index: 2; padding: 16px; gap: 10px; overflow: visible; }
.hw-seg { display: flex; padding: 3px; border-radius: var(--os-radius-sm); background: var(--os-bg-inset); font-size: var(--os-fs-xs); }
.hw-seg span { flex: 1; text-align: center; padding: 5px 8px; border-radius: var(--os-radius-xs); color: var(--os-text-muted); }
.hw-seg .on { background: var(--os-bg-surface); color: var(--os-text); font-weight: 500; box-shadow: var(--os-shadow-xs); }
.hw-link { display: flex; align-items: center; gap: 6px; padding: 4px 4px 4px 10px; border-radius: var(--os-radius-sm); background: var(--os-bg-subtle); border: 1px solid var(--os-border-color-subtle); }
.hw-link code { flex: 1; min-width: 0; font-family: var(--os-font-mono); font-size: var(--os-fs-2xs); color: var(--os-text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hw-btn { flex: none; padding: 5px 10px; border-radius: var(--os-radius-sm); background: var(--os-c1); color: var(--os-c1-fg); font-size: var(--os-fs-xs); font-weight: 500; }
.hw-more { display: grid; place-items: center; width: 24px; height: 24px; border-radius: var(--os-radius-sm); color: var(--os-text-secondary); font-size: 16px; }
.hw-note { margin: -2px 0 0; font-size: var(--os-fs-xs); color: var(--os-text-muted); }
.hw-people { display: flex; flex-direction: column; margin-top: 4px; border-top: 1px solid var(--os-border-color-subtle); }
.hw-person { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-size: var(--os-fs-sm); }
.hw-person small { margin-left: auto; font-size: var(--os-fs-xs); color: var(--os-text-muted); }
.hw-role { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; padding: 3px 6px 3px 8px; border-radius: var(--os-radius-sm); font-size: var(--os-fs-xs); color: var(--os-text-secondary); }
.hw-role.open { position: relative; background: var(--os-bg-inset); color: var(--os-text); }
.hw-add { color: var(--os-text-secondary); }
.hw-plus { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1px dashed var(--os-border-color); font-style: normal; font-size: 12px; }
.hw-pop { position: absolute; z-index: 4; right: -6px; top: calc(100% + 6px); width: 15rem; text-align: left; color: var(--os-text); font-size: var(--os-fs-base); display: flex; flex-direction: column; padding: 4px; background: var(--os-bg-elevated); border: 1px solid var(--os-border-color); border-radius: var(--os-radius-md); box-shadow: var(--os-shadow-xl); }
.hw-pop span { display: grid; grid-template-columns: 16px 1fr; column-gap: 6px; padding: 6px 8px; border-radius: var(--os-radius-sm); }
.hw-pop span.on { background: var(--os-bg-subtle); }
.hw-pop em { grid-row: span 2; font-style: normal; font-size: 13px; color: var(--os-c1); padding-top: 1px; }
.hw-pop b { font-size: var(--os-fs-sm); }
.hw-pop small { grid-column: 2; margin: 0; font-size: var(--os-fs-2xs); color: var(--os-text-muted); }
/* someone else's browser: grey chrome, Seamside's page inside it in full */
.hw-phone { right: 6%; bottom: -6%; width: 30%; height: 64%; border-radius: 28px 28px 0 0; padding: 12px 10px 0; gap: 10px; border-bottom: 0; }
.hw-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-muted); }
.hw-addr .ph-light { font-size: 11px; }
.hw-inside { position: relative; flex: 1; padding: 10px 10px 0; border-radius: var(--os-radius-md) var(--os-radius-md) 0 0; background: var(--os-bg); color: var(--os-text); }
.hw-inside h4 { font-size: var(--os-fs-xl); }
.hw-inside .hw-meta { margin-bottom: 8px; }
.hw-inside .hw-row b { color: var(--os-text); font-weight: 500; }
.hw-inside .hw-tile { width: 24px; height: 24px; font-size: 14px; }
.hw-inside .hw-row > .ph-light { width: 24px; font-size: 16px; color: var(--os-text-secondary); }
.hw-inside .hw-tile .ph-light { color: inherit; }
.hw-pill { position: absolute; left: 10px; bottom: 16%; 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); }
.hw-pill magic-orb { width: 14px; height: 14px; display: block; }

/* 4 · conjure: the wish card, and the drawer of things to drop on it */
.hw-wish { left: 50%; top: 10%; width: min(30rem, 78%); transform: translateX(-50%); padding: 20px 22px 16px; gap: 14px; border-radius: var(--os-radius-xl); }
.hw-wtext { margin: 0; font-family: var(--os-font-serif); font-size: var(--os-fs-2xl); line-height: 1.3; letter-spacing: -0.015em; text-wrap: pretty; }
.hw-caret { display: inline-block; width: 2px; height: 1.05em; margin-left: 2px; vertical-align: -0.15em; background: var(--os-c1); animation: hw-blink 1.1s steps(1) infinite; }
@keyframes hw-blink { 50% { opacity: 0; } }
.hw-dropped { display: flex; flex-wrap: wrap; gap: 8px; }
.hw-ing { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px 6px 6px; border-radius: var(--os-radius-md); background: color-mix(in srgb, var(--t), var(--os-bg-elevated) 84%); border: 1px solid color-mix(in srgb, var(--t), transparent 70%); font-size: var(--os-fs-xs); }
.hw-ing > .ph-light { display: grid; place-items: center; width: 22px; height: 22px; border-radius: var(--os-radius-sm); background: var(--t); color: var(--os-bg-elevated); font-size: 13px; }
.hw-sw { display: inline-flex; gap: 3px; }
.hw-sw i { width: 14px; height: 14px; border-radius: 50%; }
.hw-wfoot { display: flex; align-items: center; justify-content: space-between; padding-top: 12px; border-top: 1px solid var(--os-border-color-subtle); }
.hw-into { display: inline-flex; align-items: center; gap: 4px; font-size: var(--os-fs-xs); color: var(--os-text-secondary); }
.hw-go { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 8px; border-radius: var(--os-radius-full); background: var(--os-text); color: var(--os-bg); font-size: var(--os-fs-sm); font-weight: 500; }
.hw-go magic-orb { width: 16px; height: 16px; }
.hw-drawer { position: absolute; left: 50%; bottom: 7%; transform: translateX(-50%); display: flex; gap: 4px; padding: 4px; background: var(--os-bg-elevated); border: 1px solid var(--os-border-color-subtle); border-radius: var(--os-radius-xl); box-shadow: var(--os-shadow-lg); }
.hw-drawer > span { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 52px; padding: 6px 0 5px; border-radius: var(--os-radius-md); font-size: var(--os-fs-2xs); color: var(--os-text-secondary); }
.hw-dt { display: grid; place-items: center; width: 30px; height: 30px; border-radius: var(--os-radius-sm); background: var(--t); color: var(--tf); font-style: normal; font-size: 16px; }
.hw-drawer > span:nth-child(7) { background: var(--os-bg-subtle); }

/* 5 · devices: the home page's network picture, full size */
.hw-beat .net.still .stage { min-height: 0; padding: 40px 32px; border-radius: var(--os-radius-2xl); }

@media (prefers-reduced-motion: reduce) { .hw-caret { animation: none; } .hw-index a { transition: none; } }

@media (max-width: 60rem) {
  .hw-cols, .hw-beat.flip .hw-cols { grid-template-columns: 1fr; gap: 40px; }
  .hw-beat.flip .hw-say { order: 0; }
  .hw-beat { padding-top: 112px; }
  .hw-pic { aspect-ratio: auto; height: 32rem; max-height: 125vw; }
  .hw-beat.minor .hw-pic { aspect-ratio: auto; }
}
@media (max-width: 36rem) {
  .hw-hero + .hw-beat { padding-top: 88px; }
  .hw-beat { padding-top: 96px; }
  .hw-pic { height: auto; aspect-ratio: 4 / 5; max-height: none; font-size: var(--os-fs-sm); }
  .hw-beat.minor .hw-pic { aspect-ratio: 4 / 5; }
  /* the menu bar keeps only what matters: the orb and its menu */
  .hw-os-l span, .hw-os-r > span:last-child { display: none; }
  .hw-browser { left: 5%; width: 70%; top: 16%; }
  .hw-menu { width: 13.5rem; }
  .hw-finder { left: 5%; top: 5%; width: 82%; }
  .hw-spacepage { right: 5%; bottom: 5%; width: 86%; }
  .hw-panel { left: 5%; top: 5%; width: 82%; }
  .hw-pop { width: 13rem; }
  .hw-phone { display: none; }
  .hw-wish { width: 88%; top: 6%; }
  .hw-wtext { font-size: var(--os-fs-xl); }
  .hw-drawer { flex-wrap: wrap; justify-content: center; width: 88%; bottom: 5%; }
  .hw-drawer > span { width: 20%; }
}

/* 5 · Make it yours: the three layouts, one of them being changed */
.hw-defaults { left: 10%; right: 10%; top: 15%; overflow: visible; }
.hw-defaults .hw-sp { padding: 8px 20px 12px; }
.hw-defaults .hw-row { padding: 12px 0; font-size: var(--os-fs-md); }
.hw-defaults .hw-row:first-child { border-top: 0; }
.hw-defaults .hw-role { border: 1px solid var(--os-border-color-subtle); }
.hw-orbhit .tray-mark { color: var(--os-text); }
.hw-pic-yours { aspect-ratio: 16 / 11; }

/* 6 · History: a dot per version, the chosen one captioned */
.hw-hist { left: 10%; right: 10%; top: 50%; transform: translateY(-50%); }
.hw-line { position: relative; display: flex; justify-content: space-between; align-items: center; margin: 10px 4px 0; height: 16px; }
.hw-line::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px solid var(--os-border-color); }
.hw-line i { position: relative; width: 9px; height: 9px; border-radius: 50%; background: var(--os-bg-elevated); border: 1.5px solid var(--os-text-muted); }
.hw-line i.at { width: 13px; height: 13px; background: var(--os-c1); border-color: var(--os-c1); box-shadow: 0 0 0 4px color-mix(in srgb, var(--os-c1), transparent 80%); }
.hw-line i.now { background: var(--os-text); border-color: var(--os-text); }
.hw-cap { display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 12px; margin: 14px 0 6px; padding: 10px 12px; border-radius: var(--os-radius-md); background: var(--os-bg-subtle); }
.hw-cap b { font-size: var(--os-fs-sm); }
.hw-cap small { grid-column: 1; font-size: var(--os-fs-2xs); color: var(--os-text-muted); }
.hw-cap .hw-btn { grid-column: 2; grid-row: 1 / 3; }
@media (max-width: 60rem) { .hw-pic-yours { aspect-ratio: auto; } }
@media (max-width: 36rem) { .hw-pic-yours { aspect-ratio: 4 / 5; } .hw-defaults { left: 5%; right: 5%; } }
