/* anywhere (#anywhere, dark): the reference's code panel, with tabs for browser, desktop app, mobile app and company sign-in */
.aw-head { padding-bottom: 56px; }
.aw-panel { position: relative; max-width: 880px; background: var(--surface); border: 1px solid var(--line); }
.aw-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; min-height: 48px; padding: 9px 20px; border-bottom: 1px solid var(--line); }
.aw-tabs { display: flex; align-items: center; gap: 4px; }
.aw-tab { position: relative; display: inline-flex; align-items: center; height: 28px; padding: 0 12px; overflow: hidden; background: transparent; border: 0; color: var(--mist); font: 500 12.5px/1 var(--f-mono); cursor: pointer; transition: color .15s var(--ease), background .2s var(--ease); white-space: nowrap; }
.aw-tab:hover { color: var(--fg); }
.aw-tab[aria-selected="true"] { color: var(--accent-ink); background: var(--accent); }
.aw-short { display: none; }
.aw-fill { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: rgba(255, 255, 255, 0.6); transform: scaleX(0); transform-origin: left; pointer-events: none; }
.aw-tab.is-run .aw-fill { animation: aw-fill linear forwards; animation-duration: var(--dur, 7s); }
@keyframes aw-fill { to { transform: scaleX(1); } }
.aw-tools { display: flex; align-items: center; gap: 22px; }
.aw-tool { color: var(--mist); font-size: 13px; text-decoration: none; transition: color .15s var(--ease); }
.aw-tool:hover { color: var(--fg); }
.aw-copy { display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 11px; background: transparent; border: 1px solid var(--line-strong); color: var(--fg); font: 500 13px/1 var(--f-body); cursor: pointer; transition: background .15s var(--ease), border-color .15s var(--ease); }
.aw-copy .ic { width: 14px; height: 14px; }
.aw-copy:hover { background: var(--surface-raised); border-color: var(--mist); }
.aw-copy.is-done { border-color: var(--ok); }
.aw-copy.is-done .ic { color: var(--ok-text); }

.aw-body { position: relative; height: 412px; overflow: hidden; }
.aw-view { position: absolute; inset: 0; display: flex; flex-direction: column; padding: 28px 32px 26px; opacity: 0; transform: translateY(8px); transition: opacity .35s var(--ease), transform .45s var(--ease-out); pointer-events: none; }
.aw-view[hidden] { display: flex; visibility: hidden; }
.aw-view.is-on { opacity: 1; transform: none; pointer-events: auto; visibility: visible; }

/* response block, like the reference's response line under the code */
.aw-resp { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); font-family: var(--f-mono); }
.aw-out { color: var(--fg); font-size: 13px; line-height: 22px; }
.aw-meta { color: var(--mist); font-size: 12px; line-height: 22px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* code lines with numbers */
.aw-lines { list-style: none; margin: 0 0 18px; padding: 0; counter-reset: awl; font: 400 13px/22px var(--f-mono); color: var(--fg); }
.aw-lines li { position: relative; display: block; padding-left: 44px; white-space: pre; overflow: hidden; text-overflow: ellipsis; counter-increment: awl; animation: aw-line .25s var(--ease) both; }
.aw-lines li::before { content: counter(awl); position: absolute; left: 0; width: 22px; text-align: right; color: var(--mist); opacity: .8; }
@keyframes aw-line { from { opacity: 0; transform: translateY(6px); } }
.aw-k { color: var(--mist); }
.aw-s { color: #8fd3a8; }
.aw-v { color: var(--fg); }
.aw-r { color: var(--accent-text); }
.aw-ok { color: var(--ok-text); }
.aw-dim { color: var(--mist); }
.aw-caret { display: inline-block; width: 7px; height: 14px; margin-left: 3px; vertical-align: -2px; background: var(--accent-line); animation: caret 1s steps(1) infinite; }

/* fake cursor */
.aw-cursor { position: absolute; left: 0; top: 0; z-index: 6; width: 20px; height: 20px; fill: #fff; stroke: #111; stroke-width: 1.2; stroke-linejoin: round; opacity: 0; pointer-events: none; transform: translate(var(--x, 0px), var(--y, 0px)); transition: transform .75s cubic-bezier(.45, 0, .2, 1), opacity .25s var(--ease); filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .4)); }
.aw-cursor.on { opacity: 1; }
.aw-cursor.press { transition: transform .12s var(--ease); transform: translate(var(--x, 0px), var(--y, 0px)) scale(.86); }

/* ---------- browser view ---------- */
.aw-win { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; background: #0d0e10; border: 1px solid var(--line-strong); overflow: hidden; }
.aw-chrome { display: flex; align-items: center; gap: 14px; height: 30px; padding: 0 10px; background: #18191c; border-bottom: 1px solid var(--line); }
.aw-dots { display: flex; gap: 5px; }
.aw-dots i { width: 7px; height: 7px; border-radius: 50%; background: #3a3b40; }
.aw-url { flex: 1; display: flex; align-items: center; gap: 6px; height: 19px; max-width: 360px; padding: 0 9px; background: #0f1012; border: 1px solid var(--line); color: var(--fg-2); font: 400 11px/1 var(--f-mono); white-space: nowrap; overflow: hidden; }
.aw-url .ic { width: 11px; height: 11px; color: var(--ok-text); }
.aw-url-path { color: var(--mist); }
.aw-av { display: inline-grid; place-items: center; width: 18px; height: 18px; margin-left: auto; background: var(--c, #555); color: #fff; font: 600 8.5px/1 var(--f-body); letter-spacing: 0.02em; flex: none; }
.aw-av--sm { width: 16px; height: 16px; font-size: 7.5px; }
.aw-av--lg { width: 46px; height: 46px; margin: 0; font-size: 17px; }
.aw-app { flex: 1; min-height: 0; display: flex; }
.aw-side { width: 148px; flex: none; display: flex; flex-direction: column; gap: 10px; padding: 12px 10px; border-right: 1px solid var(--line); }
.aw-brand { display: flex; align-items: center; gap: 7px; color: var(--fg); font: 600 12px/1 var(--f-body); }
.aw-brand img { width: 20px; height: auto; }
.aw-new { display: inline-flex; align-items: center; gap: 5px; align-self: flex-start; height: 22px; padding: 0 9px 0 6px; background: var(--accent); color: #fff; font: 500 11px/1 var(--f-body); }
.aw-new .ic { width: 12px; height: 12px; stroke-width: 2; }
.aw-side ul { list-style: none; margin: 2px 0 0; padding: 0; display: grid; gap: 2px; }
.aw-side li { display: flex; align-items: center; gap: 7px; height: 22px; padding: 0 6px; color: var(--mist); font-size: 11px; }
.aw-side li .ic { width: 13px; height: 13px; }
.aw-side li.on { color: var(--fg); background: var(--accent-soft); box-shadow: inset 2px 0 0 var(--accent-line); }
.aw-srv { margin-top: auto; padding-left: 12px; position: relative; color: var(--fg-2); font: 500 9.5px/1.4 var(--f-mono); letter-spacing: 0.04em; }
.aw-srv span { color: var(--mist); }
.aw-srv i { position: absolute; left: 0; top: 4px; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(31, 138, 91, .18); }
.aw-main { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 12px 14px 12px; }
.aw-crumb { display: flex; align-items: center; gap: 6px; color: var(--mist); font-size: 11.5px; }
.aw-crumb .ic { width: 11px; height: 11px; }
.aw-crumb b { color: var(--fg); font-weight: 500; }
.aw-pill { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; height: 19px; padding: 0 8px; border: 1px solid rgba(31, 138, 91, .45); color: var(--ok-text); font: 500 9.5px/1 var(--f-mono); letter-spacing: .04em; white-space: nowrap; }
.aw-pill i { width: 5px; height: 5px; border-radius: 50%; background: var(--ok-text); animation: aw-blink 2s var(--ease) infinite; }
@keyframes aw-blink { 50% { opacity: .35; } }
.aw-grid { flex: 1; min-height: 0; margin-top: 11px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 9px; }
.aw-card { position: relative; display: flex; flex-direction: column; min-height: 0; background: #151619; border: 1px solid var(--line); transition: border-color .2s var(--ease), background .2s var(--ease), opacity .4s var(--ease), transform .5s var(--ease-out); }
.aw-card.pre { opacity: 0; transform: translateY(8px); }
.aw-card.sel { border-color: var(--accent-line); background: #1a1314; }
.aw-th { flex: 1; min-height: 0; margin: 5px 5px 0; overflow: hidden; background: #f3f1ec; }
.aw-th img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.aw-th--sheet { background: #fbfbf9 repeating-linear-gradient(0deg, transparent 0 9px, #c9d0cc 9px 10px), repeating-linear-gradient(90deg, transparent 0 22px, #c9d0cc 22px 23px); background-blend-mode: multiply; position: relative; }
.aw-th--sheet::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 10px; background: #23866B; opacity: .85; }
.aw-th--slide { position: relative; background: #fff; }
.aw-th--slide::before { content: ""; position: absolute; left: 10%; top: 14%; width: 52%; height: 9%; background: #1a1d22; }
.aw-th--slide::after { content: ""; position: absolute; left: 10%; top: 34%; width: 80%; height: 46%; background: linear-gradient(90deg, #E0A63A 0 30%, transparent 30% 36%, #e7e3dc 36% 100%); }
.aw-cn { display: flex; align-items: center; gap: 5px; padding: 6px 6px 7px; color: var(--fg-2); font-size: 10px; line-height: 1.2; white-space: nowrap; overflow: hidden; }
.aw-cn span:last-child { overflow: hidden; text-overflow: ellipsis; }
.aw-ty { flex: none; display: inline-grid; place-items: center; height: 12px; padding: 0 3px; color: #fff; font: 600 7px/1 var(--f-mono); letter-spacing: 0.03em; background: #C94235; }
.aw-ty.sheet { background: #23866B; }
.aw-ty.slide { background: #C2771F; }
.aw-pop { position: absolute; z-index: 5; width: 300px; padding: 11px 12px; background: #1b1c1f; border: 1px solid var(--line-strong); color: var(--fg); font-size: 11.5px; line-height: 1.45; opacity: 0; transform: translateY(6px); transition: opacity .25s var(--ease), transform .35s var(--ease-out); pointer-events: none; }
.aw-pop.on { opacity: 1; transform: none; }
.aw-pop b { display: block; font-weight: 500; margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aw-pop span { display: flex; align-items: flex-start; gap: 7px; color: var(--mist); font: 400 10.5px/1.7 var(--f-mono); }
.aw-pop em { font-style: normal; color: var(--ok-text); }
.aw-pop .ic { width: 12px; height: 12px; margin-top: 3px; flex: none; }

/* ---------- split views (mobile, sign-in) ---------- */
.aw-split { flex: 1; min-height: 0; display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 36px; }
.aw-device { position: relative; display: grid; place-items: center; min-height: 0; }
.aw-side-col { display: flex; flex-direction: column; min-width: 0; padding-top: 6px; }
.aw-lines--side { margin-bottom: 14px; }
.aw-lines--side li { padding-left: 40px; }

/* phone */
.aw-phone { position: relative; width: 178px; height: 354px; padding: 7px; background: #050506; border: 1px solid #3a3b40; border-radius: 28px; box-shadow: inset 0 0 0 2px #1d1e21; }
.aw-screen { position: relative; width: 100%; height: 100%; overflow: hidden; border-radius: 22px; background: #101114; }
.aw-status { display: flex; align-items: center; justify-content: space-between; height: 22px; padding: 0 14px; color: var(--fg); font: 600 9px/1 var(--f-body); }
.aw-sig { display: flex; align-items: flex-end; gap: 1.5px; height: 8px; }
.aw-sig i { width: 2px; background: var(--fg); }
.aw-sig i:nth-child(1) { height: 3px; } .aw-sig i:nth-child(2) { height: 5px; } .aw-sig i:nth-child(3) { height: 6.5px; } .aw-sig i:nth-child(4) { height: 8px; }
.aw-ph-list, .aw-ph-prev { position: absolute; left: 0; right: 0; top: 22px; bottom: 0; display: flex; flex-direction: column; transition: transform .45s cubic-bezier(.4, 0, .2, 1), opacity .3s var(--ease); }
.aw-ph-prev { transform: translateX(100%); background: #101114; }
.aw-phone.is-prev .aw-ph-list { transform: translateX(-28%); opacity: .4; }
.aw-phone.is-prev .aw-ph-prev { transform: none; }
.aw-ph-head { display: flex; align-items: center; gap: 7px; padding: 6px 12px 8px; color: var(--fg); font-size: 13px; }
.aw-ph-head img { width: 18px; height: auto; }
.aw-ph-head b { font-weight: 600; }
.aw-ph-search { display: flex; align-items: center; gap: 6px; margin: 0 10px 6px; height: 22px; padding: 0 8px; background: #1a1b1f; color: var(--mist); font-size: 9px; }
.aw-ph-search .ic { width: 10px; height: 10px; }
.aw-ph-items { list-style: none; margin: 0; padding: 0 6px; flex: 1; min-height: 0; overflow: hidden; }
.aw-ph-items li { position: relative; display: flex; align-items: center; gap: 8px; padding: 5px 6px; cursor: pointer; transition: background .2s var(--ease); }
.aw-ph-items li:hover, .aw-ph-items li.tap { background: #1c1d21; }
.aw-ph-items img, .aw-ph-ico { flex: none; width: 26px; height: 33px; object-fit: cover; object-position: top; background: #f3f1ec; }
.aw-ph-ico { display: grid; place-items: center; background: #1f2024; color: var(--mist); }
.aw-ph-ico .ic { width: 14px; height: 14px; }
.aw-ph-t { min-width: 0; display: grid; gap: 2px; }
.aw-ph-t b { color: var(--fg); font-weight: 500; font-size: 9.5px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aw-ph-t span { color: var(--mist); font-size: 8px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aw-ph-tabs { display: flex; justify-content: space-around; align-items: center; height: 32px; border-top: 1px solid var(--line); color: var(--mist); }
.aw-ph-tabs .ic { width: 14px; height: 14px; }
.aw-ph-tabs .on { color: var(--accent-line); }
.aw-ph-bar { display: flex; align-items: center; gap: 4px; padding: 4px 8px 6px 4px; color: var(--fg); font-size: 9.5px; font-weight: 500; white-space: nowrap; overflow: hidden; }
.aw-ph-bar span { overflow: hidden; text-overflow: ellipsis; }
.aw-ph-back { display: grid; place-items: center; width: 22px; height: 22px; flex: none; padding: 0; background: transparent; border: 0; color: var(--fg); cursor: pointer; }
.aw-ph-back .ic { width: 13px; height: 13px; transform: scaleX(-1); }
.aw-ph-page { flex: 1; min-height: 0; margin: 0 10px; background: #f3f1ec; overflow: hidden; }
.aw-ph-page img { width: 100%; height: auto; }
.aw-ph-share { display: flex; align-items: center; height: 34px; padding: 0 10px; color: var(--mist); font: 500 8.5px/1.3 var(--f-mono); letter-spacing: .02em; }
.aw-tap { position: absolute; z-index: 4; left: 0; top: 0; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%; background: rgba(255, 255, 255, .28); border: 1px solid rgba(255, 255, 255, .6); opacity: 0; transform: scale(.4); pointer-events: none; }
.aw-tap.go { animation: aw-tap .6s var(--ease-out) both; }
@keyframes aw-tap { 0% { opacity: 0; transform: scale(.4); } 30% { opacity: 1; } 100% { opacity: 0; transform: scale(1.5); } }

/* sign-in card */
.aw-sso { position: relative; width: 296px; height: 334px; background: #0d0e10; border: 1px solid var(--line-strong); overflow: hidden; }
.aw-sso-a, .aw-sso-b { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 26px 24px; text-align: center; transition: opacity .4s var(--ease), transform .5s var(--ease-out); }
.aw-sso-b { opacity: 0; transform: translateY(10px); pointer-events: none; }
.aw-sso.is-done .aw-sso-a { opacity: 0; transform: translateY(-10px); pointer-events: none; }
.aw-sso.is-done .aw-sso-b { opacity: 1; transform: none; pointer-events: auto; }
.aw-sso-mark { width: 46px; height: auto; margin-bottom: 18px; }
.aw-sso-title { color: var(--fg); font-size: 16px; font-weight: 500; letter-spacing: -0.01em; }
.aw-sso-pre { margin-top: 16px; color: var(--mist); font: 500 10px/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; }
.aw-sso-b .aw-sso-title { margin-top: 8px; font-size: 16px; }
.aw-sso-org { margin-top: 6px; color: var(--mist); font-size: 12px; }
.aw-sso-btn { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 38px; margin-top: 24px; padding: 0 12px; background: var(--fg); color: var(--bg); border: 0; font: 500 12px/1 var(--f-body); cursor: pointer; transition: transform .15s var(--ease), background .2s var(--ease); }
.aw-sso-btn .ic { width: 14px; height: 14px; }
.aw-sso-btn:hover { background: #fff; }
.aw-sso-btn.press { transform: scale(.97); }
.aw-spin { display: none; width: 13px; height: 13px; border: 1.5px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: aw-spin .7s linear infinite; }
.aw-sso-btn.busy .ic { display: none; }
.aw-sso-btn.busy .aw-spin { display: block; }
@keyframes aw-spin { to { transform: rotate(1turn); } }
.aw-sso-or { position: relative; width: 100%; margin-top: 18px; color: var(--mist); font: 500 10px/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; }
.aw-sso-or::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--line); }
.aw-sso-or span { position: relative; padding: 0 10px; background: #0d0e10; }
.aw-sso-foot { margin-top: 18px; color: var(--mist); font: 400 10px/1 var(--f-mono); }
.aw-sso-ok { display: inline-flex; align-items: center; gap: 6px; margin-top: 20px; color: var(--ok-text); font: 500 11px/1 var(--f-mono); }
.aw-sso-ok .ic { width: 14px; height: 14px; stroke-width: 2; }
.aw-sso-prog { position: relative; width: 140px; height: 2px; margin-top: 14px; background: var(--line); overflow: hidden; }
.aw-sso-prog i { position: absolute; inset: 0; background: var(--ok); transform: scaleX(0); transform-origin: left; }
.aw-sso.is-done .aw-sso-prog i { transition: transform 2.2s cubic-bezier(.3, 0, .2, 1) .3s; transform: scaleX(1); }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .aw-panel { max-width: none; }
}
@media (max-width: 820px) {
  .aw-side { width: 118px; }
  .aw-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .aw-card:nth-child(n+9) { display: none; }
  .aw-split { grid-template-columns: 250px minmax(0, 1fr); gap: 24px; }
  .aw-sso { width: 250px; }
}
@media (max-width: 700px) {
  .aw-head { padding-bottom: 36px; }
  .aw-long { display: none; }
  .aw-short { display: inline; }
  .aw-bar { flex-wrap: wrap; padding: 10px 12px; }
  .aw-tabs { gap: 2px; }
  .aw-tab { padding: 0 9px; font-size: 12px; }
  .aw-tools { width: 100%; justify-content: space-between; gap: 12px; }
  .aw-body { height: 520px; }
  .aw-view { padding: 18px 14px 16px; }
  .aw-side { display: none; }
  .aw-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(3, minmax(0, 1fr)); gap: 7px; }
  .aw-card:nth-child(n+9) { display: flex; }
  .aw-card:nth-child(n+10) { display: none; }
  .aw-pill { display: none; }
  .aw-url-path { display: none; }
  .aw-lines { font-size: 11.5px; line-height: 21px; }
  .aw-lines li { padding-left: 30px; }
  .aw-lines li::before { width: 18px; }
  .aw-split { display: flex; flex-direction: column; gap: 14px; }
  .aw-device { flex: 1; }
  .aw-side-col { flex: none; padding-top: 0; }
  .aw-lines--side { display: none; }
  .aw-sso { width: min(296px, 100%); height: 330px; }
  .aw-meta { white-space: normal; line-height: 18px; }
  .aw-pop { width: 240px; }
}
