/* Demo tokens */
.browser[data-demo] {
  --a-board: #0e0e0f;
  --a-slab: #1a1a1a;
  --a-on: #efefef;
  --a-band: #151515;
  --a-soft: color-mix(in srgb, var(--a-on) 80%, var(--a-slab));
  --a-mute: color-mix(in srgb, var(--a-on) 66%, var(--a-slab));
  --a-faint: color-mix(in srgb, var(--a-on) 60%, var(--a-slab));
  --a-line: color-mix(in srgb, var(--a-on) 9%, transparent);
  --a-hover: color-mix(in srgb, var(--a-on) 6%, transparent);
  --a-press: 0.96;
}
:root[data-theme="light"] .browser[data-demo] {
  --a-board: #f2f2f2;
  --a-slab: #ffffff;
  --a-on: #0e0e0f;
  --a-band: color-mix(in srgb, #0e0e0f 4%, #f2f2f2);
}

/* Demo browser */
.browser[data-demo] .page { overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; background: var(--a-board); container: page / inline-size; scrollbar-width: thin; scrollbar-color: var(--a-line) transparent; }
.browser[data-demo] input { -webkit-user-select: text; user-select: text; }
.app .sites[data-sort] .site { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.frame.has-lift:not(.is-lifted) .browser[data-demo] .page { overflow: hidden; }
.browser[data-demo] .page .sketch { padding-top: 2.5em; }
.browser[data-demo] .tab { flex: 0 1 auto; }
.browser[data-demo] .tab:focus-visible { outline: 2px solid var(--focus); outline-offset: -3px; border-radius: 10px 10px 0 0; }
.browser[data-demo] .tab .logo, .browser[data-demo] .tab .globe { pointer-events: none; }
.browser[data-demo] .tab .logo { flex: none; width: 1.15em; height: 1.15em; color: currentColor; --logo-ground: var(--band); }
.browser[data-demo] .tab.is-active .logo { --logo-ground: var(--band); }
.browser[data-demo] .tab:not(.is-active) .logo { --logo-ground: var(--chrome); }
.browser[data-demo] .tab .globe { flex: none; width: 1.05em; height: 1.05em; }
.browser[data-demo] .bookmarks { overflow: hidden; }
.browser[data-demo] .bm { height: 2.1em; align-self: center; }
.browser[data-demo] .bm .globe { flex: none; width: 1.05em; height: 1.05em; }
.browser[data-demo] .ext { overflow: visible; }
.browser[data-demo] .hint-peek { position: static; flex: none; align-self: center; height: 2.1em; margin-left: auto; padding: 0 0.85em; font-size: 0.8125em; translate: none; box-shadow: none; }
.frame.has-lift.is-lifted .browser[data-demo] .hint-peek { display: none; }
.browser[data-demo] .hint-bm { top: 8.6em; }
.browser[data-demo] .hint-cw { top: 3.15em; }

/* Demo popup */
.browser[data-demo] .app-popup .mark { display: grid; place-items: center; width: 34px; height: 34px; margin: -2px 0 -2px -4px; padding: 0; border: 0; background: none; color: var(--p-on); cursor: pointer; }
.browser[data-demo] .app-popup .mark .logo { width: 100%; height: 100%; margin: 0; --logo-ground: var(--p-slab); }
.browser[data-demo] .app-popup button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
.browser[data-demo] .app-popup .check { background: var(--p-on); color: var(--p-slab); transition: scale var(--dur-fast) var(--ease-out); }
.browser[data-demo] .app-popup .check:active { scale: 0.96; }
.browser[data-demo] .app-popup .check svg { transition: rotate 700ms cubic-bezier(0.65, 0, 0.35, 1); }
.browser[data-demo] .app-popup .check.is-busy svg { animation: demo-spin 0.9s linear infinite; }
.browser[data-demo] .app-popup .link { color: var(--p-mute); border-radius: 8px; transition: color var(--dur-fast) ease, background-color var(--dur-fast) ease; }
.browser[data-demo] .app-popup .link:disabled { opacity: 0.45; cursor: default; }
.browser[data-demo] .app-popup .label { padding: 0; text-align: left; }
.browser[data-demo] .app-popup .item { width: calc(100% + 8px); text-align: left; transition: background-color var(--dur-fast) ease; }
.browser[data-demo] .app-popup .item:first-child { background: none; box-shadow: none; }
.browser[data-demo] .app-popup .empty { display: grid; gap: 2px; padding: 18px 12px; text-align: center; }
.browser[data-demo] .app-popup .empty b { font-weight: 600; }
.browser[data-demo] .app-popup .empty span { color: var(--p-mute); font-size: 12px; }
.browser[data-demo] .app-popup .list { max-height: min(29rem, calc(100svh - 20rem)); overflow-y: auto; scrollbar-width: thin; }
.browser[data-demo] .app-popup .list.has-more { -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 36px), transparent); }
@media (hover: hover) and (pointer: fine) {
  .browser[data-demo] .app-popup .link:not(:disabled):hover { background: var(--p-wash); color: var(--p-on); }
  .browser[data-demo] .app-popup .item:hover { background: var(--p-item); }
  .browser[data-demo] .app-popup .check:not(.is-busy):hover { background: color-mix(in srgb, var(--p-on) 90%, var(--p-slab)); }
  .browser[data-demo] .app-popup .check:not(.is-busy):hover svg { rotate: 360deg; }
  .browser[data-demo] .app-popup .label:hover { text-decoration: underline; text-underline-offset: 3px; }
}
@keyframes demo-spin { to { rotate: 360deg; } }

/* App base */
.app { min-height: 100%; background: var(--a-board); color: var(--a-on); font-size: 13px; line-height: 1.45; letter-spacing: -0.005em; text-align: left; }
.app p { margin: 0; }
.app button, .app input { font: inherit; color: inherit; }
.app .wrap { display: flex; flex-direction: column; gap: 22px; max-width: 1100px; margin: 0 auto; padding: 46px 28px 32px; }
.app :focus-visible { outline: 2px solid var(--a-on); outline-offset: 2px; }

/* App hero */
.app .hero { display: flex; align-items: flex-start; gap: 14px; }
.app .hero .mark { flex: none; display: grid; place-items: center; width: 50px; height: 50px; margin: -4px -2px 0 -6px; padding: 0; border: 0; background: none; color: var(--a-on); cursor: pointer; }
.app .hero .mark .logo { width: 100%; height: 100%; --logo-ground: var(--a-board); }
.app .mark.is-hop, .browser[data-demo] .app-popup .mark.is-hop { animation: demo-hop 560ms var(--ease-pop); }
@keyframes demo-hop { 35% { translate: 0 -5px; rotate: -8deg; } 70% { translate: 0 0; rotate: 3deg; } }
.app .hero .info { flex: 1; min-width: 0; }
.app .hero .name { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 2px 0 4px; font-size: 22px; font-weight: 600; letter-spacing: -0.025em; line-height: 1.2; }
.app .hero .text { max-width: 52ch; color: var(--a-soft); }
.app .hero-actions { display: flex; flex: none; align-items: center; gap: 6px; }
.app .hero > .control { flex: none; margin-top: 2px; }
.app .tag { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: var(--r-pill); background: #0e0e0f; color: var(--lime); font-size: 11px; font-weight: 600; letter-spacing: 0.01em; box-shadow: 0 0 0 1px color-mix(in srgb, var(--lime) 35%, transparent); }
:root[data-theme="light"] .app .tag { box-shadow: none; }
.app .version { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: var(--r-pill); background: var(--a-slab); box-shadow: 0 0 0 1px var(--a-line); color: var(--a-mute); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; font-weight: 500; letter-spacing: 0; }

/* App controls */
.app .control { position: relative; isolation: isolate; display: inline-flex; flex: none; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 14px; border: 0; border-radius: var(--r-pill); background: color-mix(in srgb, var(--a-on) 7%, var(--a-slab)); color: var(--a-on); font-size: 13px; font-weight: 500; white-space: nowrap; cursor: pointer; transition: scale var(--dur-fast) var(--ease-out), background-color var(--dur-fast) ease, color var(--dur-fast) ease, opacity var(--dur-fast) ease; }
.app .control::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: var(--a-hover); opacity: 0; transition: opacity var(--dur-fast) ease; }
.app .control:active { scale: var(--a-press); }
.app .control:disabled { opacity: 0.45; cursor: default; }
.app .control svg { width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.app .control-ghost { background: none; color: var(--a-mute); }
.app .control-white { background: var(--a-slab); box-shadow: 0 0 0 1px var(--a-line); }
.app .control-board { background: color-mix(in srgb, var(--a-on) 9%, var(--a-board)); }
.app .control-dark { background: var(--a-on); color: var(--a-slab); }
.app .control-dark::before { display: none; }
.app .control-arrow { gap: 2px; padding-right: 10px; }
.app .control-arrow svg { transition: translate var(--dur-fast) var(--ease-out); }
.app .control-check { gap: 8px; height: 36px; padding: 0 16px 0 14px; }
.app .control-check .icon { stroke-width: 1.7; transition: rotate 700ms cubic-bezier(0.65, 0, 0.35, 1); }
.app .control-check.is-busy .icon { animation: demo-spin 0.9s linear infinite; }
@media (hover: hover) and (pointer: fine) {
  .app .control:not(:disabled):hover::before { opacity: 1; }
  .app .control-ghost:not(:disabled):hover { color: var(--a-on); }
  .app .control-dark:not(:disabled):hover { background: color-mix(in srgb, var(--a-on) 90%, var(--a-board)); }
  .app .control-check:not(.is-busy):hover .icon { rotate: 360deg; }
  .app .control-arrow:hover svg { translate: 2px 0; }
}

/* App boxes */
.app .box { display: flex; flex-direction: column; padding: 0 4px 4px; border-radius: 20px; background: var(--a-band); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--a-on) 5%, transparent); }
.app .box > .top-wrap { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px 10px 8px 14px; }
.app .box .h { color: var(--a-soft); font-size: 13px; font-weight: 600; }
.app .box .aside { min-width: 0; margin-left: auto; padding-left: 16px; overflow: hidden; color: var(--a-mute); text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.app .box .count { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 20px; padding: 0 8px; border-radius: var(--r-pill); background: var(--a-slab); box-shadow: 0 0 0 1px var(--a-line); color: var(--a-soft); font-size: 11px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.app .card { border-radius: 16px; background: var(--a-slab); box-shadow: 0 0 0 1px var(--a-line), 0 1px 2px color-mix(in srgb, var(--a-on) 5%, transparent); }
.app .card-split > * + * { border-top: 1px solid var(--a-line); }
.app .card.empty, .app li.empty, .app .card .empty { padding: 18px; color: var(--a-mute); text-align: center; list-style: none; }

/* App folds */
.app .box-fold > .top-wrap { width: 100%; padding: 6px 6px 6px 14px; border: 0; border-radius: 16px; background: none; text-align: left; cursor: pointer; }
.app .box-fold:not(.is-open) { padding-bottom: 0; }
.app .box-fold .plus { display: grid; flex: none; place-items: center; width: 32px; height: 32px; margin-left: auto; border-radius: var(--r-pill); background: var(--a-slab); box-shadow: 0 0 0 1px var(--a-line); color: var(--a-soft); transition: scale var(--dur-fast) var(--ease-out), color var(--dur-fast) ease; }
.app .box-fold .plus svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; transition: rotate 320ms var(--ease-spring); }
.app .box-fold > .top-wrap:active .plus { scale: 0.92; }
.app .box-fold > .top-wrap[aria-expanded="true"] .plus { color: var(--a-on); }
.app .box-fold > .top-wrap[aria-expanded="true"] .plus svg { rotate: 135deg; }
.app .box-fold .fold { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--dur-slow) var(--ease-out); }
.app .box-fold.is-open .fold { grid-template-rows: 1fr; }
.app .box-fold .fold > div { min-width: 0; min-height: 0; margin: -1px; padding: 1px; overflow: clip; }
.app .box-fold:not(.is-open) .fold > div { margin: 0; padding: 0; visibility: hidden; transition: visibility 0s linear var(--dur-slow); }
.app .box-fold .fold .card { opacity: 0; translate: 0 6px; filter: blur(4px); transition: opacity var(--dur-fast) ease, translate var(--dur-fast) ease, filter var(--dur-fast) ease; }
.app .box-fold.is-open .fold .card { opacity: 1; translate: 0 0; filter: blur(0); transition: opacity 260ms var(--ease-out) 80ms, translate 260ms var(--ease-out) 80ms, filter 260ms var(--ease-out) 80ms; }
@media (hover: hover) and (pointer: fine) {
  .app .box-fold > .top-wrap:hover .h { color: var(--a-on); }
  .app .box-fold > .top-wrap:hover .plus { color: var(--a-on); }
}
.app .tools { display: flex; align-items: center; gap: 6px; padding: 6px 6px 8px 12px; border-bottom: 1px solid var(--a-line); }
.app .tools .aside { flex: 1; margin: 0; padding: 0; color: var(--a-mute); font-size: 12px; text-align: left; white-space: normal; }

/* App feed */
.app .feed-list { display: flex; flex-direction: column; gap: 14px; }
.app .feed-bar { display: flex; align-items: center; gap: 8px; padding-left: 4px; }
.app .feed-bar .detail { flex: 1; min-width: 0; color: var(--a-mute); }
.app .feed-bar .actions { display: flex; flex: none; gap: 8px; }
.app .feeds { display: grid; gap: 12px; }
.app .feed > .top-wrap { gap: 12px; padding: 10px; }
.app span.icon { display: grid; flex: none; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--a-slab); box-shadow: 0 0 0 1px var(--a-line); color: var(--a-mute); }
.app span.icon .globe { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.3; }
.app .feed .info { flex: 1; min-width: 0; }
.app .feed .title { overflow: hidden; font-size: 14px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.app .feed .detail { overflow: hidden; color: var(--a-mute); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.app .chip { display: inline-flex; flex: none; align-items: center; gap: 6px; height: 22px; padding: 0 10px 0 8px; border: 0; border-radius: var(--r-pill); background: #0e0e0f; color: #ffffff; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.app .chip::before { content: ""; width: 6px; height: 6px; border-radius: var(--r-pill); background: var(--lime); }
:root:not([data-theme="light"]) .app .chip { box-shadow: 0 0 0 1px color-mix(in srgb, var(--lime) 35%, transparent); }
.app .feed-actions { display: flex; flex: none; gap: 4px; }
.app .items { margin: 0; padding: 4px; list-style: none; }
.app .entry { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 8px 10px 8px 14px; border: 0; border-radius: 10px; background: none; text-align: left; cursor: pointer; transition: background-color var(--dur-fast) ease, scale var(--dur-fast) var(--ease-out); }
.app .entry:active { scale: 0.99; }
.app .entry .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app .entry .when { color: var(--a-faint); font-size: 12px; white-space: nowrap; }
.app .entry svg { width: 13px; height: 13px; flex: none; fill: none; stroke: var(--a-mute); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: translate var(--dur-fast) var(--ease-out); }
.app .entry.is-seen .name { color: var(--a-soft); }
@media (hover: hover) and (pointer: fine) {
  .app .entry:hover { background: var(--a-hover); }
  .app .entry:hover svg { translate: 1.5px -1.5px; stroke: var(--a-on); }
}
.app .feeds > .empty { display: grid; justify-items: center; gap: 6px; padding: 40px 20px; border-radius: 20px; background: var(--a-slab); box-shadow: 0 0 0 1px var(--a-line); text-align: center; }
.app .feeds > .empty .title { font-size: 16px; font-weight: 600; }
.app .feeds > .empty p:not(.title) { max-width: 44ch; color: var(--a-mute); }
.app .feeds > .empty .control { margin-top: 8px; }
.app .credit { display: flex; align-items: center; gap: 4px; padding: 6px 2px 0; color: var(--a-mute); font-size: 12px; }
.app .credit svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* App segment */
.app .seg-wrap { display: flex; justify-content: center; padding-top: 6px; }
.app .segment { --seg-pad: 4px; --seg-h: 34px; position: relative; isolation: isolate; display: inline-grid; grid-template-columns: repeat(var(--seg-count, 2), minmax(0, 1fr)); padding: var(--seg-pad); border-radius: calc(var(--seg-h) / 2 + var(--seg-pad)); background: var(--a-band); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--a-on) 5%, transparent); }
.app .segment::before { content: ""; position: absolute; top: var(--seg-pad); bottom: var(--seg-pad); left: var(--seg-pad); z-index: -1; width: calc((100% - 2 * var(--seg-pad)) / var(--seg-count, 2)); border-radius: calc(var(--seg-h) / 2); background: var(--a-on); translate: calc(var(--seg-active, 0) * 100%) 0; transition: translate 500ms cubic-bezier(0.625, 0.05, 0, 1); }
.app .segment .pill { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: var(--seg-h); padding: 0 20px; border: 0; border-radius: calc(var(--seg-h) / 2); background: none; color: var(--a-soft); font-size: 13px; font-weight: 500; white-space: nowrap; cursor: pointer; transition: color 260ms ease; }
.app .segment .pill.is-on { color: var(--a-slab); cursor: default; }
.app .segment .count { font-size: 12px; font-variant-numeric: tabular-nums; opacity: 0.62; }
.app .segment-icons { --seg-h: 32px; flex: none; }
.app .segment-icons .pill { padding: 0 14px; }
.app .segment-icons svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) and (pointer: fine) {
  .app .segment .pill:not(.is-on):hover { color: var(--a-on); }
}
.app .pane { display: flex; flex-direction: column; gap: 16px; }

/* App how */
.app .how-close { display: grid; place-items: center; width: 32px; height: 32px; margin-left: auto; padding: 0; border: 0; border-radius: var(--r-pill); background: var(--a-slab); box-shadow: 0 0 0 1px var(--a-line); color: var(--a-soft); cursor: pointer; transition: scale var(--dur-fast) var(--ease-out), color var(--dur-fast) ease; }
.app .how-close svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.app .how-close:active { scale: 0.92; }
.app .how-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; padding: 16px; }
.app .how-art { min-width: 0; }
.app .how-art .mini { overflow: hidden; border-radius: 12px; background: color-mix(in srgb, var(--a-on) 3%, var(--a-board)); box-shadow: 0 0 0 1px var(--a-line); }
.app .how-art .chrome { display: flex; align-items: center; gap: 12px; height: 32px; padding: 0 12px; border-bottom: 1px solid var(--a-line); }
.app .how-art .dots { display: flex; gap: 6px; }
.app .how-art .dots i { width: 9px; height: 9px; border-radius: 50%; background: color-mix(in srgb, var(--a-on) 14%, var(--a-board)); }
.app .how-art .bar-tab { width: 96px; height: 18px; border-radius: 6px; background: var(--a-slab); box-shadow: 0 0 0 1px var(--a-line); }
.app .how-art .bar-field { flex: 1; max-width: 340px; height: 18px; border-radius: var(--r-pill); background: color-mix(in srgb, var(--a-on) 6%, var(--a-board)); }
.app .how-art .strip { display: flex; gap: 18px; height: 40px; padding: 0 14px; overflow: hidden; align-items: center; }
.app .how-art .item { display: inline-flex; flex: none; align-items: center; gap: 6px; color: var(--a-soft); white-space: nowrap; }
.app .how-art .item .globe { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.3; }
.app .how-art .item.has-count { color: var(--a-on); }
.app .how-art .item b { font-weight: 650; }
.app .how-art .caption { margin: 8px 2px 0; color: var(--a-faint); font-size: 12px; }
.app .steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.app .steps li { display: grid; align-content: start; gap: 4px; counter-increment: step; }
.app .steps li::before { content: counter(step); display: grid; place-items: center; width: 22px; height: 22px; margin-bottom: 8px; border-radius: 50%; background: var(--a-on); color: var(--a-slab); font-size: 11px; font-weight: 600; }
.app .steps b { font-size: 13px; font-weight: 600; }
.app .steps li > span { color: var(--a-mute); font-size: 12px; line-height: 1.5; text-wrap: pretty; }

/* App sites */
.app .sites { position: relative; margin: 0; padding: 4px; list-style: none; }
.app .site { position: relative; border-radius: 10px; background: var(--a-slab); }
.app .site > .top-wrap { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 10px; }
.app .sites[data-sort] .site > .top-wrap { cursor: grab; }
.app .grip { display: grid; flex: none; place-items: center; width: 14px; height: 24px; margin: 0 -6px 0 -4px; color: var(--a-faint); touch-action: none; cursor: grab; opacity: 0; transition: opacity var(--dur-fast) ease; }
.app .grip svg { width: 14px; height: 14px; fill: currentColor; }
.app .site .info { flex: 1; min-width: 0; }
.app .site .title { overflow: hidden; font-size: 14px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.app .site .status { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--a-mute); font-size: 12px; }
.app .site .status > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app .site .chip { height: 20px; gap: 5px; padding: 0 6px 0 8px; font-size: 11.5px; cursor: pointer; transition: scale var(--dur-fast) var(--ease-out); }
.app .site .chip svg { width: 9px; height: 9px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; opacity: 0.7; }
.app .site .chip:active { scale: var(--a-press); }
.app .site .chip { position: relative; }
.app .site .chip::after { content: ""; position: absolute; inset: -4px -2px; }
.app .rule { display: inline-flex; flex: none; align-items: center; gap: 6px; height: 28px; padding: 0 4px 0 10px; border: 0; border-radius: var(--r-pill); background: none; color: var(--a-mute); cursor: pointer; transition: color var(--dur-fast) ease; }
.app .rule svg { width: 20px; height: 20px; padding: 4px; border-radius: 50%; background: var(--a-hover); fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; transition: rotate 320ms var(--ease-spring); }
.app .rule[aria-expanded="true"] { color: var(--a-on); }
.app .rule[aria-expanded="true"] svg { rotate: 135deg; }
.app .sites.is-sorting .site { transition: none; }
.app .site.is-held { z-index: 3; box-shadow: 0 0 0 1px var(--a-line), 0 18px 40px -18px color-mix(in srgb, #000000 60%, transparent); scale: 1.01; cursor: grabbing; }
.app .site.is-held > .top-wrap { cursor: grabbing; }
.app .site.is-landing { transition: translate 300ms cubic-bezier(0.34, 1.3, 0.64, 1), scale 220ms var(--ease-out), box-shadow 300ms ease; }
.app .rule-wrap { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; margin: 0 10px 10px 54px; padding: 12px; border-radius: 12px; background: color-mix(in srgb, var(--a-on) 3%, var(--a-slab)); box-shadow: inset 0 0 0 1px var(--a-line); }
.app .rule-wrap label { display: grid; flex: 1 1 14rem; gap: 6px; color: var(--a-mute); font-size: 12px; }
.app .rule-wrap input { height: 34px; padding: 0 12px; border: 0; border-radius: 10px; background: var(--a-slab); box-shadow: inset 0 0 0 1px var(--a-line); color: var(--a-on); font-size: 13px; outline: none; }
.app .rule-wrap input:focus-visible { box-shadow: inset 0 0 0 1.5px var(--a-on); }
.app .switch { position: relative; flex: none; width: 44px; height: 26px; padding: 0; border: 0; border-radius: var(--r-pill); background: color-mix(in srgb, var(--a-on) 12%, var(--a-slab)); cursor: pointer; }
.app .switch::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--a-on); opacity: 0; transition: opacity var(--dur-slow) ease; }
.app .switch.is-on::before { opacity: 1; }
.app .switch .thumb { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: var(--r-pill); background: var(--a-slab); box-shadow: 0 1px 2px color-mix(in srgb, #000000 18%, transparent); transition: translate 380ms var(--ease-pop); }
.app .switch.is-on .thumb { translate: 18px 0; box-shadow: none; }
@media (hover: hover) and (pointer: fine) {
  .app .sites[data-sort] .site:hover .grip { opacity: 1; }
  .app .rule:hover { color: var(--a-on); }
  .app .how-close:hover { color: var(--a-on); }
}
@media (hover: none) {
  .app .grip { opacity: 1; }
}
.app .find { display: flex; align-items: center; gap: 8px; height: 40px; margin: 4px; padding: 0 12px; border-radius: 12px; background: color-mix(in srgb, var(--a-on) 4%, var(--a-slab)); color: var(--a-mute); }
.app .find .icon { width: 14px; height: 14px; border-radius: 0; background: none; box-shadow: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.app .find input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; color: var(--a-on); font-size: 13px; outline: none; }
.app .find:focus-within { box-shadow: inset 0 0 0 1.5px var(--a-on); }

/* App settings */
.app .setting { display: flex; align-items: center; gap: 14px; padding: 14px 16px; }
.app .setting .info { flex: 1; min-width: 0; }
.app .setting .title { font-size: 14px; font-weight: 500; }
.app .setting .note { color: var(--a-mute); font-size: 12px; text-wrap: pretty; }
.app .setting-stack { flex-direction: column; align-items: stretch; }
.app .jelly { display: flex; flex-wrap: wrap; gap: 6px; margin-left: -2px; }
.app .jelly .pill { padding: 0; border: 0; background: none; cursor: pointer; }
.app .jelly .face { display: inline-flex; align-items: center; height: 34px; padding: 0 16px; border-radius: 17px; background: color-mix(in srgb, var(--a-on) 6%, var(--a-slab)); color: var(--a-soft); font-size: 13px; font-weight: 500; white-space: nowrap; transition: scale var(--dur-fast) var(--ease-out), background-color var(--dur-base) ease, color var(--dur-base) ease; }
.app .jelly .pill:active .face { scale: var(--a-press); }
.app .jelly .pill.is-on .face { background: var(--a-on); color: var(--a-slab); }
.app .jelly .pill.is-on { cursor: default; }
.app .jelly .pill:focus-visible { outline: none; }
.app .jelly .pill:focus-visible .face { outline: 2px solid var(--a-on); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) {
  .app .jelly .pill:not(.is-on):hover .face { color: var(--a-on); background: color-mix(in srgb, var(--a-on) 11%, var(--a-slab)); }
}
.app .log .entries { max-height: 14rem; margin: 0; padding: 6px 12px 10px; overflow-y: auto; list-style: none; }
.app .log .entries li { display: flex; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--a-line); font-size: 12px; }
.app .log .entries li:last-child { border-bottom: 0; }
.app .log .time { flex: none; width: 5.5rem; color: var(--a-faint); font-variant-numeric: tabular-nums; }
.app .tools-group { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 12px; }
.app .tool { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 16px; border-radius: 20px; background: var(--a-band); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--a-on) 5%, transparent); }
.app .tool .info { flex: 1; }
.app .tool .title { margin-bottom: 4px; font-size: 13px; font-weight: 600; }
.app .tool p:not(.title) { color: var(--a-mute); font-size: 12px; text-wrap: pretty; }

/* Demo toasts */
.browser .demo-notes { top: 9.4em; bottom: auto; }
.browser .demo-notes .demo-toast { translate: 0 -12px; }
.browser .demo-notes .demo-toast.is-in { translate: 0 0; }
.browser .demo-toasts { position: absolute; right: 16px; bottom: 16px; z-index: 8; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; width: min(22rem, calc(100% - 32px)); pointer-events: none; }
.browser .demo-toast { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 14px; border-radius: 14px; background: var(--a-slab); box-shadow: 0 0 0 1px var(--a-line), 0 18px 40px -16px color-mix(in srgb, #000000 55%, transparent); color: var(--a-on); font-size: 13px; line-height: 1.35; opacity: 0; translate: 0 12px; transition: opacity 260ms var(--ease-out), translate 360ms var(--ease-pop); }
.browser .demo-toast.is-in { opacity: 1; translate: 0 0; }
.browser .demo-toast .dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--a-mute); }
.browser .demo-toast.toast-success .dot { background: var(--lime); box-shadow: 0 0 0 3px color-mix(in srgb, var(--lime) 20%, transparent); }
.browser .demo-toast .text { display: grid; flex: 1; min-width: 0; gap: 2px; }
.browser .demo-toast .text b { font-weight: 500; }
.browser .demo-toast .text > span { color: var(--a-mute); font-size: 12px; }
.browser .demo-toast.is-note { align-items: flex-start; border-radius: 16px; background: color-mix(in srgb, var(--a-slab) 88%, transparent); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.browser .demo-toast .mark { display: grid; flex: none; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: #0e0e0f; }
.browser .demo-toast .mark .logo { width: 24px; height: 24px; color: #f2f2ef; --logo-ground: #0e0e0f; }
.browser .demo-toast .app-name { color: var(--a-faint); font-size: 11px; font-weight: 600; letter-spacing: 0.02em; }
@media (prefers-reduced-motion: reduce) {
  .browser .demo-toast, .app .segment::before, .app .switch .thumb, .app .box-fold .fold, .app .box-fold .fold .card { transition-duration: 1ms !important; }
  .app .control-check.is-busy .icon, .browser[data-demo] .app-popup .check.is-busy svg, .app .mark.is-hop { animation: none; }
}

/* Demo responsive */
@container page (max-width: 900px) {
  .app .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container page (max-width: 720px) {
  .app .wrap { gap: 16px; padding: 24px 18px 22px; }
  .app .hero { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px 12px; align-items: center; }
  .app .hero .info { display: contents; }
  .app .hero .name { margin: 0; font-size: 19px; }
  .app .hero .text { grid-column: 1 / -1; }
  .app .hero-actions, .app .hero > .control { grid-column: 1 / -1; justify-self: start; margin: 0; }
  .app .hero .mark { width: 42px; height: 42px; margin: 0; }
  .app .feed > .top-wrap { flex-wrap: wrap; }
  .app .feed > .top-wrap .info { flex: 1 1 calc(100% - 140px); }
  .app .feed-actions { flex: 1 1 100%; justify-content: flex-end; margin: -2px 0 -2px; }
  .app .box .aside { display: none; }
  .app .rule span { display: none; }
  .app .rule { padding: 0 4px; }
  .app .rule-wrap { margin-left: 10px; }
}
@container page (max-width: 520px) {
  .app .wrap { padding: 20px 12px 18px; }
  .app .feed-bar { flex-wrap: wrap; row-gap: 6px; }
  .app .feed-bar .detail { flex: 1 1 100%; }
  .app .feed-bar .actions { margin-left: -14px; }
  .app .steps { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .app .seg-wrap .segment { display: grid; width: 100%; }
  .app .setting { flex-wrap: wrap; padding: 12px; }
  .app .setting:has(.segment-icons) .info, .app .setting:has([data-act="test"]:not([hidden])) .info { flex: 1 1 100%; }
  .app .site > .top-wrap { gap: 10px; padding: 8px 6px; }
  .app .grip { display: none; }
  .app .site .status { flex-wrap: wrap; row-gap: 2px; }
  .app .log .time { width: 4.5rem; }
  .app .entry { padding-left: 10px; }
  .app .entry .when { font-size: 11px; }
  .app .feed .detail { white-space: normal; }
  .app .how-body { padding: 12px; }
  .browser .demo-toasts { right: 8px; bottom: 8px; width: calc(100% - 16px); }
}
@media (max-width: 767px) {
  .browser[data-demo] .hint-peek { padding: 0 0.7em; font-size: 0.75em; }
  .browser[data-demo] .tablist .tab:not(.is-active) { display: inline-flex; flex: none; padding: 0 0.7em; }
  .browser[data-demo] .tablist .tab:not(.is-active) > span { display: none; }
  .browser[data-demo] .tablist .tab.is-active { min-width: 0; flex: 0 1 auto; }
}

/* Helpers */
.browser .helper { z-index: 7; transition: opacity 260ms ease, scale 360ms var(--ease-pop), translate 360ms var(--ease-pop), visibility 0s linear 0s; }
.frame.has-lift.is-lifted .browser .helper { opacity: 0; scale: 0.9; visibility: hidden; pointer-events: none; transition: opacity 200ms ease, scale 240ms var(--ease-out), translate 240ms var(--ease-out), visibility 0s linear 240ms; }
.frame.has-lift.is-lifted .browser .helper-tab { display: none; }
.browser .helper-tab { flex: none; gap: 0.6em; margin-left: auto; padding: 0 0.8em 0 1em; }
.browser .helper-tab svg { width: 1em; height: 1em; }
.browser .helper-tab svg path { transition: translate 400ms var(--ease-out); }
.browser .chip-open.helper { position: absolute; gap: 8px; height: 46px; padding: 0 6px 0 18px; }
.browser .chip-open.helper .glyph { width: 34px; height: 34px; }
.browser .chip-open.helper .new { min-width: 3.6em; transition: background-color 260ms ease; }
.browser .chip-open.helper .new.is-empty { background: color-mix(in srgb, #ffffff 14%, transparent); color: #f2f2ef; }
.browser .helper-corner { top: -23px; right: clamp(16px, 3vw, 40px); }
.browser .helper-edge { top: -23px; left: 50%; translate: -50% 0; }
.frame.has-lift.is-lifted .browser .helper-edge { translate: -50% 6px; }
.browser .helper-page { top: calc(8.7em + 24px); left: 50%; translate: -50% 0; }
:root[data-theme="light"] .browser .chip-open.helper { box-shadow: 0 24px 50px -22px color-mix(in srgb, #000000 50%, transparent); }
@media (hover: hover) and (pointer: fine) {
  .browser .helper-tab:hover svg .tr { translate: 1.5px -1.5px; }
  .browser .helper-tab:hover svg .bl { translate: -1.5px 1.5px; }
  .browser .helper-edge:hover, .browser .helper-page:hover { translate: -50% -3px; }
  .browser .helper-corner:hover { translate: 0 -3px; }
}
.browser .helper:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.browser .helper-tab > span { position: static !important; width: auto !important; height: auto !important; overflow: visible !important; clip: auto !important; }
:root:not([data-theme="light"]) .browser .helper { background: #f2f2ef; color: #0e0e0f; box-shadow: 0 24px 50px -20px color-mix(in srgb, #000000 80%, transparent); }
:root:not([data-theme="light"]) .browser .chip-open.helper .glyph { background: color-mix(in srgb, #0e0e0f 8%, transparent); }
:root:not([data-theme="light"]) .browser .chip-open.helper .new { box-shadow: inset 0 0 0 1px #0e0e0f; }
:root:not([data-theme="light"]) .browser .chip-open.helper .new.is-empty { background: color-mix(in srgb, #0e0e0f 8%, transparent); color: #0e0e0f; box-shadow: none; }
@media (max-width: 767px) {
  .browser .helper-page { top: calc(8.7em + 14px); right: 12px; left: auto; translate: none; }
  .browser .chip-open.helper { height: 42px; padding-left: 14px; font-size: 0.8125rem; }
  .browser .chip-open.helper .glyph { width: 30px; height: 30px; }
  .browser .helper-corner { right: 12px; }
  .browser .helper-tab { padding: 0 0.7em 0 0.85em; font-size: 0.75rem; }
}
@media (max-width: 400px) {
  .browser .chip-open.helper .new { display: none; }
}

/* Final */
section.is-final:has(> .frame.has-lift) { --footer-h: 0px; --peek: clamp(7.5rem, 24svh, 17rem); padding-top: calc(var(--header-h) + clamp(1.5rem, 3.5svh, 2.75rem)); }
section.is-final > .frame.has-lift { --peek: clamp(7.5rem, 24svh, 17rem); }
section.is-final.has-coin { --coin: min(clamp(4rem, 3rem + 3vw, 6rem), 9svh); }
section.is-final.has-coin .intro { gap: min(calc(var(--gap) * 0.7), 2.6svh); }
section.is-final .intro .title { max-width: 24ch; font-size: min(var(--h1), 10.5svh); }
section.is-final .intro .lead { max-width: 31em; margin-top: clamp(0.25rem, 1.2svh, 0.875rem); }
@media (max-width: 767px) {
  section.is-final:has(> .frame.has-lift) { padding-top: calc(var(--header-h) + clamp(0.5rem, 2svh, 1.5rem)); }
}

/* Helper swap */
@media (prefers-reduced-motion: no-preference) {
  .frame.has-lift:not(.is-lifted) .browser .helper-tab { animation: helper-in 560ms cubic-bezier(0.22, 1, 0.36, 1) 520ms both; }
  .frame.has-lift.is-lifted .browser .win-close { animation: helper-in 460ms cubic-bezier(0.22, 1, 0.36, 1) 260ms both; }
}
@keyframes helper-in { from { opacity: 0; scale: 0.92; filter: blur(4px); } to { opacity: 1; scale: 1; filter: blur(0); } }
@media (max-width: 479px) {
  .frame.has-lift:not(.is-lifted) .browser[data-demo] .tablist .tab:not(.is-active) { display: none; }
}

/* Click to lift */
@media (max-height: 780px) and (min-width: 768px) {
  section.is-final .intro .title { font-size: min(var(--h1), 9.4svh); }
  section.is-final.has-coin { --coin: min(clamp(4rem, 3rem + 3vw, 6rem), 8svh); }
}

/* Hover cues */
.frame[data-hover-cue~="eyes"] rect.cut { transform-box: fill-box; }
.is-screen > .frame.has-lift[data-hover-cue~="tilt"] { perspective: 2600px; }
.is-screen > .frame.has-lift[data-hover-cue~="tilt"] .browser { transform-origin: 50% calc(var(--peek) / 2); transition: translate 0.75s cubic-bezier(0.65, 0, 0.35, 1); }
.is-screen > .frame.has-lift[data-hover-cue~="tilt"].is-lifted .browser { transition: translate 1.05s cubic-bezier(0.16, 1, 0.3, 1); }
.browser .cue-sheen { --sheen-dark: color-mix(in srgb, #000000 10%, transparent); --sheen-light: color-mix(in srgb, #ffffff 3%, transparent); position: absolute; inset: 0; z-index: 6; border-radius: inherit; opacity: 0; pointer-events: none; }
:root[data-theme="light"] .browser .cue-sheen { --sheen-dark: color-mix(in srgb, #0e0e0f 3.5%, transparent); --sheen-light: color-mix(in srgb, #ffffff 25%, transparent); }
.browser .cue-light { --glow: color-mix(in srgb, var(--lime) 14%, transparent); --rim: color-mix(in srgb, var(--lime) 75%, transparent); position: absolute; inset: 0; z-index: 6; border-radius: inherit; opacity: 0; pointer-events: none; background: radial-gradient(34rem circle at var(--lx, 50%) var(--ly, 0), var(--glow), transparent 62%); transition: opacity 400ms ease; }
.browser .cue-light::after { content: ""; position: absolute; inset: 0; padding: 1px; border-radius: inherit; background: radial-gradient(22rem circle at var(--lx, 50%) var(--ly, 0), var(--rim), transparent 70%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
:root[data-theme="light"] .browser .cue-light { --glow: color-mix(in srgb, var(--lime) 26%, transparent); --rim: color-mix(in srgb, #0e0e0f 45%, transparent); }
.browser .cue-light.is-on { opacity: 1; }
.cue-label { position: fixed; top: 0; left: 0; z-index: 60; display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px 0 12px; border-radius: 999px; background: var(--ink); color: var(--board); font-size: 0.8125rem; font-weight: 600; white-space: nowrap; pointer-events: none; opacity: 0; scale: 0.6; transform-origin: 0 0; box-shadow: 0 14px 30px -12px color-mix(in srgb, #000000 55%, transparent); transition: opacity 200ms ease, scale 360ms cubic-bezier(0.34, 1.56, 0.64, 1); }
.cue-label i { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 1.5px var(--board); }
.cue-label.is-on { opacity: 1; scale: 1; }
@media (prefers-reduced-motion: reduce) {
  .cue-label { transition: opacity 150ms ease; scale: 1; }
}

/* Default favicon */
.browser .fav { display: block; flex: none; width: 16px; height: 16px; -webkit-user-drag: none; }
.browser[data-demo] .bm .fav, .browser[data-demo] .tab .fav { width: max(1.15em, 14px); height: max(1.15em, 14px); }
.browser[data-demo] .app-popup .site .row .fav { width: 16px; height: 16px; }
.app span.icon .fav { width: 18px; height: 18px; border-radius: 4px; }
.app .how-art .item .fav { width: 14px; height: 14px; }
.browser[data-demo]:has(.page[data-view="whats-new"], .page[data-view="settings"]) .hint-bm { opacity: 0 !important; transition-delay: 0s !important; }
@media (max-width: 400px) {
  .browser[data-demo] .tabs { padding-left: 0.4em; }
  .browser[data-demo] .lights { display: none; }
  .browser[data-demo] .win-close .pill { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .browser[data-demo] .tablist .tab { padding: 0 0.7em; }
}
