/* The from-anywhere section (home/anywhere.js): ChatGPT on a phone saves a note through Vaultite's connector, and the
   note opens on the Mac with its live answer (a ```genui fence) drawn. */
.anywhere { max-width: 1100px; margin: var(--after-fan) auto 0; padding: 0 24px; }
.anywhere + .plugins { margin-top: var(--after-fan); }
.anywhere > header { text-align: center; margin-bottom: 56px; }
.anywhere h2 { font-family: "Instrument Serif", Georgia, serif; font-weight: 400; font-size: clamp(2.4rem, 5vw, 3.8rem); line-height: 1; letter-spacing: -0.02em; }
.anywhere h2 em { color: var(--teal); }
.anywhere > header p { max-width: 44rem; margin: 1rem auto 0; color: var(--muted); font-size: 1.05rem; line-height: 1.55; }

.fa-stage { display: grid; grid-template-columns: 288px minmax(0, 1fr); align-items: center; gap: 56px; transition: opacity 0.5s; }
.anywhere.fade .fa-stage { opacity: 0; }

/* The phone: a black bezel, an island, a chat in ChatGPT's plain look. */
.fa-phone { width: 288px; height: 592px; padding: 9px; border-radius: 48px; background: #1b1a17; box-shadow: var(--window-shadow), inset 0 0 0 1.5px #3a3833; }
/* The phone is ChatGPT's app, in its own colours (light or dark with the page). */
.fa-phone { --cg-bg: #fff; --cg-fg: #0d0d0d; --cg-soft: #f2f2f2; --cg-dim: #5d5d5d; --cg-shine: #d0d0d0; --cg-hint: #8f8f8f; --cg-line: #e3e3e3; }
:root[data-theme="dark"] .fa-phone { --cg-bg: #212121; --cg-fg: #ececec; --cg-soft: #303030; --cg-dim: #a4a4a4; --cg-shine: #f0f0f0; --cg-hint: #8f8f8f; --cg-line: #3a3a3a; }
.fa-screen { position: relative; height: 100%; overflow: hidden; border-radius: 40px; background: var(--cg-bg); color: var(--cg-fg); font-size: 13.5px; line-height: 1.5; }
.fa-status { display: flex; align-items: center; justify-content: space-between; height: 44px; padding: 0 26px 0 30px; font-size: 12.5px; font-weight: 600; }
.fa-island { width: 82px; height: 24px; border-radius: 20px; background: #000; }
.fa-bars { display: flex; align-items: flex-end; gap: 2px; height: 10px; }
.fa-bars i { width: 3px; border-radius: 1px; background: var(--cg-fg); }
.fa-bars i:nth-child(1) { height: 5px; }
.fa-bars i:nth-child(2) { height: 7.5px; }
.fa-bars i:nth-child(3) { height: 10px; }
.fa-top { display: flex; align-items: center; justify-content: space-between; height: 42px; padding: 0 18px; }
.fa-top b { font-weight: 600; font-size: 15px; }
.fa-menu { display: flex; flex-direction: column; gap: 5px; width: 18px; }
.fa-menu i { height: 1.8px; border-radius: 2px; background: var(--cg-fg); }
.fa-menu i:nth-child(2) { width: 11px; }
.fa-spacer { width: 18px; }

.fa-thread { position: absolute; top: 86px; left: 0; right: 0; bottom: 74px; padding: 10px 16px; overflow: hidden; }
.fa-hello { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; font-size: 17px; font-weight: 600; transition: opacity 0.3s; }
.fa-hello img { width: 34px; height: 34px; }
.fa-hello.gone { opacity: 0; }
.fa-you { width: fit-content; max-width: 84%; margin: 0 0 16px auto; padding: 8px 13px; border-radius: 18px; background: var(--cg-soft); animation: fapop 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.2); transform-origin: bottom right; }
.fa-tool { display: flex; align-items: center; gap: 6px; height: 22px; color: var(--cg-dim); font-size: 12.5px; animation: fapop 0.3s ease-out; }
.fa-tool img { width: 15px; height: 15px; }
.fa-tool .fa-chev { width: 6px; height: 6px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(-45deg); margin-left: 2px; }
.fa-tool.run span { background: linear-gradient(90deg, var(--cg-dim) 30%, var(--cg-shine) 50%, var(--cg-dim) 70%) 0 0 / 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: fashine 1.4s linear infinite; }
.fa-call { display: flex; align-items: center; gap: 6px; height: 30px; margin: 6px 0 12px; padding: 0 10px; border-radius: 10px; background: var(--cg-soft); color: var(--cg-dim); font: 11px/1 "JetBrains Mono", monospace; white-space: nowrap; overflow: hidden; animation: fapop 0.3s ease-out; }
.fa-call b { font-weight: 500; color: var(--cg-fg); }
.fa-call span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.fa-reply p { margin-bottom: 8px; }
.fa-reply strong { font-weight: 600; }
.fa-reply .fa-dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; background: var(--cg-fg); vertical-align: -1px; animation: fabeat 0.9s ease-in-out infinite; }

.fa-input { position: absolute; left: 12px; right: 12px; bottom: 22px; display: flex; align-items: flex-end; gap: 8px; min-height: 44px; padding: 6px 6px 6px 12px; border-radius: 24px; border: 1px solid var(--cg-line); box-shadow: 0 2px 10px -4px rgba(0, 0, 0, 0.12); background: var(--cg-bg); }
.fa-plus { height: 30px; font-size: 21px; font-weight: 300; line-height: 28px; color: var(--cg-dim); }
.fa-field { flex: 1; min-width: 0; padding: 5px 0; min-height: 30px; max-height: 66px; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; }
.fa-hint { color: var(--cg-hint); }
.fa-send { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--cg-line); transition: background 0.2s, transform 0.12s; }
.fa-send svg { width: 16px; height: 16px; fill: none; stroke: var(--cg-bg); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.fa-send.on { background: var(--cg-fg); }
.fa-send.press { transform: scale(0.88); }
.fa-caret { display: inline-block; width: 1.5px; height: 1.1em; margin-left: 1px; vertical-align: -0.18em; background: var(--cg-fg); animation: fablink 1.05s steps(1) infinite; }

/* The Mac: Vaultite's window, its file list, the note. */
.fa-window { background: var(--paper); }
.fa-window .window-bar span { font-size: 0.8rem; }
.fa-app { display: grid; grid-template-columns: 172px minmax(0, 1fr); height: 450px; }
.fa-side { padding: 16px 10px; border-right: 1px solid var(--edge); background: var(--well); font-size: 0.82rem; }
.fa-folder { height: 28px; padding: 0 8px; line-height: 28px; color: var(--muted); font-weight: 500; }
.fa-folder::before { content: ""; display: inline-block; width: 5px; height: 5px; margin: 0 8px 2px 1px; border: solid var(--faint); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.fa-file { height: 28px; padding: 0 8px 0 26px; border-radius: 7px; line-height: 28px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: background 0.3s, color 0.3s; }
.fa-file.on { background: var(--wash); font-weight: 500; }
.fa-slot { height: 0; transition: height 0.3s ease-out; }
.fa-slot.in { height: 28px; }
.fa-slot .fa-file { animation: fanew 2.6s ease-out; }

.fa-main { min-width: 0; display: flex; flex-direction: column; }
.fa-head { display: flex; align-items: center; height: 44px; padding: 0 18px; border-bottom: 1px solid var(--edge); font-size: 0.8rem; color: var(--muted); }
.fa-crumbs { margin-right: auto; white-space: nowrap; }
.fa-crumbs b { font-weight: 500; color: var(--fg); }
.fa-by { display: flex; align-items: center; gap: 6px; opacity: 0; transition: opacity 0.4s; white-space: nowrap; }
.fa-by img { width: 13px; height: 13px; }
.fa-by.on { opacity: 1; }
.fa-note { flex: 1; padding: 28px 34px 0 36px; overflow: hidden; font-size: 0.98rem; line-height: 1.6; transition: opacity 0.25s; }
.fa-note.out { opacity: 0; }
.fa-note h3 { font-weight: 650; font-size: 1.55rem; letter-spacing: -0.02em; line-height: 1.2; margin-bottom: 0.7rem; }
.fa-note .fa-li { position: relative; padding-left: 22px; }
.fa-note .fa-li::before { content: ""; position: absolute; left: 8px; top: 0.7em; width: 5px; height: 5px; border-radius: 50%; background: var(--bullet); }
.fa-note > p { margin-bottom: 1rem; }

/* The live answer, drawn with the app's parts: a card, a segmented control, progress bars. */
.fa-card { display: flex; flex-direction: column; gap: 12px; max-width: 460px; padding: 16px 18px; border-radius: 14px; border: 1px solid var(--edge); background: var(--raised); box-shadow: 0 6px 18px -10px rgba(var(--shade), 0.25); animation: fapop 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.15); transform-origin: top left; }
.fa-card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.fa-sum b { display: block; font-size: 1.25rem; font-weight: 650; letter-spacing: -0.01em; line-height: 1.25; font-variant-numeric: tabular-nums; }
.fa-sum span { color: var(--muted); font-size: 0.8rem; }
.fa-seg { position: relative; display: flex; flex: none; padding: 3px; border-radius: 999px; background: var(--well); font-size: 0.76rem; font-weight: 500; }
.fa-seg span { position: relative; z-index: 1; padding: 4px 11px; white-space: nowrap; transition: color 0.2s; color: color-mix(in srgb, var(--fg) 70%, transparent); }
.fa-seg span.on { color: var(--fg); font-weight: 600; }
.fa-seg i { position: absolute; top: 3px; bottom: 3px; left: 3px; border-radius: 999px; background: var(--raised); box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12); transition: left 0.3s cubic-bezier(0.3, 0.8, 0.3, 1), width 0.3s; }
.fa-seg.press span:last-child { transform: scale(0.94); }
.fa-rows { display: flex; flex-direction: column; gap: 9px; }
.fa-row { display: grid; grid-template-columns: 128px minmax(0, 1fr) 54px; align-items: center; gap: 12px; font-size: 0.84rem; }
.fa-row em { font-style: normal; text-align: right; font-variant-numeric: tabular-nums; font-weight: 500; }
.fa-bar { height: 7px; border-radius: 9px; background: var(--wash); overflow: hidden; }
.fa-bar i { display: block; width: 0; height: 100%; border-radius: 9px; background: var(--teal); transition: width 0.8s cubic-bezier(0.25, 0.8, 0.3, 1); }

@keyframes fapop { from { opacity: 0; scale: 0.92; } }
@keyframes fashine { to { background-position: -150% 0; } }
@keyframes fabeat { 50% { scale: 0.7; } }
@keyframes fablink { 50% { opacity: 0; } }
@keyframes fanew { 0%, 30% { background: color-mix(in srgb, var(--teal) 20%, transparent); color: var(--teal); } }

@media (max-width: 860px) {
  .fa-stage { grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 40px; }
  .fa-window { width: 100%; }
}
@media (max-width: 760px) {
  .anywhere { padding: 0 16px; }
  .anywhere > header { margin-bottom: 40px; }
  .fa-phone { width: 256px; height: 520px; border-radius: 44px; }
  .fa-screen { border-radius: 36px; font-size: 12.5px; }
  .fa-thread { bottom: 70px; }
  .fa-input { bottom: 16px; }
  .fa-app { grid-template-columns: 118px minmax(0, 1fr); height: 470px; }
  .fa-side { padding: 12px 6px; font-size: 0.72rem; }
  .fa-folder { padding: 0 4px; }
  .fa-folder::before { margin-right: 6px; }
  .fa-file { padding: 0 6px 0 16px; }
  .fa-head { padding: 0 12px; font-size: 0.72rem; }
  .fa-by { display: none; }
  .fa-note { padding: 18px 14px 0 16px; font-size: 0.86rem; }
  .fa-note h3 { font-size: 1.25rem; }
  .fa-card { gap: 10px; padding: 12px; }
  .fa-rows { gap: 7px; }
  .fa-card-top { flex-direction: column; align-items: flex-start; gap: 8px; }
  .fa-sum b { font-size: 1.1rem; }
  .fa-row { grid-template-columns: minmax(0, 1fr) auto; row-gap: 4px; column-gap: 8px; font-size: 0.76rem; }
  .fa-row .fa-bar { grid-column: 1 / -1; grid-row: 2; height: 5px; }
}
@media (prefers-reduced-motion: reduce) {
  .anywhere *, .fa-stage { animation: none !important; transition: none !important; }
}
