/* ============================================================
   Space home, built on the official site's tokens and windows (styles/site/).
   Same rule as the site: every space has a sky. Here the sky is the space's own time of
   day, drawn still behind the header so a working page stays calm, and the work sits on
   quiet paper below it. Recent artifacts float on small skies, like the site's examples.
   ============================================================ */

/* Astryx 徽标只处理已确认的状态，布局沿用产品壳。 */
.astryx-badge {
  --spacing-1: .25rem;
  --spacing-2: .5rem;
  --spacing-5: 1.25rem;
  --radius-full: 9999px;
  --font-weight-medium: 500;
  --text-supporting-size: .75rem;
  --text-supporting-leading: 1.3333;
  --color-neutral: var(--surface-3);
  --color-text-primary: var(--ink-2);
  --color-success: #e9f5ed;
  --color-on-success: var(--success-text);
  --color-warning: #fff3dc;
  --color-on-warning: var(--warning-text);
  height: auto;
  min-height: var(--spacing-5);
  padding-block: 2px;
  white-space: normal;
  overflow-wrap: anywhere;
}
.astryx-badge[data-variant="error"] {
  --color-neutral: var(--error-surface);
  --color-text-primary: var(--error-text);
}

/* ------------------------------------------------------------ skies */
/* fallbacks until the dither is drawn, or without WebGL */
.dz[data-scene="h-dawn"] { background: linear-gradient(180deg, #060b29 0%, #0d1a55 28%, #16308f 48%, #a49be2 64%, #fb6a58 74%, var(--paper) 100%); }
.dz[data-scene="h-noon"] { background: linear-gradient(180deg, #80a0f2, #c6d4f7 58%, var(--paper)); }
.dz[data-scene="h-dusk"] { background: linear-gradient(180deg, #1a1a5c, #6d3a9c 38%, #e0587f 62%, #f8ab3e 80%, var(--paper)); }
.es-sky .dz[data-scene="dusk"] { background: linear-gradient(180deg, #3b2a86, #a8479a 45%, #fb7a5c 75%, #ffd88e); }

/* ------------------------------------------------------------ nav: the site's, plus the space switch */
.nav-in { gap: 12px; }
.nav-slash { font-size: 22px; font-weight: 300; opacity: .32; }
.nav nav { margin-left: auto; }
.nav-links a[aria-current="page"] { opacity: 1; background: rgba(255, 255, 255, .14); }
.nav[data-tone="light"] .nav-links a[aria-current="page"] { background: rgba(12, 17, 48, .07); }
.nav-av { display: grid; place-items: center; width: 36px; height: 36px; margin-left: 6px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3); }
.nav[data-tone="light"] .nav-av { box-shadow: inset 0 0 0 1px var(--line-2); }
.nav-av .av { --s: 28px; font-size: 12px; }
.av[data-avatar-color="#1f5fe5"] { --c: #1f5fe5; }
.av[data-avatar-color="#d0577a"] { --c: #d0577a; }
.av[data-avatar-color="#2f9e7a"] { --c: #2f9e7a; }
.av[data-avatar-color="#f2a51c"] { --c: #f2a51c; }
.av[data-avatar-color="#7a6ad8"] { --c: #7a6ad8; }
.av[data-avatar-color="#2f7d9e"] { --c: #2f7d9e; }
.av[data-avatar-color="#a86b2f"] { --c: #a86b2f; }
.av[data-avatar-color="#5b6ee0"] { --c: #5b6ee0; }
.av[data-avatar-color="#858ba3"] { --c: #858ba3; }
.av[data-avatar-color="#8a90a6"] { --c: #8a90a6; }

.sp-switch-wrap { position: relative; }
.sp-switch { display: inline-flex; align-items: center; gap: 9px; height: 38px; padding: 0 11px 0 7px; border-radius: 999px; background: rgba(255, 255, 255, .13); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .26); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); font-size: 14.5px; transition: background .2s, box-shadow .2s; }
.sp-switch:hover { background: rgba(255, 255, 255, .22); }
.nav[data-tone="light"] .sp-switch { background: rgba(255, 255, 255, .72); box-shadow: inset 0 0 0 1px var(--line-2); }
.nav[data-tone="light"] .sp-switch:hover { background: #fff; }
.sp-switch b { font-weight: 650; letter-spacing: -.01em; white-space: nowrap; }
.sp-switch .ic { width: 14px; height: 14px; opacity: .7; transition: transform .25s var(--ease); }
.sp-switch[aria-expanded="true"] .ic { transform: rotate(180deg); }

/* a space's swatch is a sliver of its sky */
.sw { --sw-shadow: inset 0 0 0 1px rgba(255, 255, 255, .4), inset 0 -1px 0 rgba(0, 0, 0, .12); flex: none; width: 24px; height: 24px; border-radius: 7px; background: var(--g); box-shadow: var(--sw-shadow); rotate: -7deg; }

.sp-menu.win { position: absolute; z-index: 60; top: calc(100% + 10px); left: 0; width: 320px; padding: 12px 8px 8px; background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; animation: grow .22s var(--ease); }
.sp-menu-label { padding: 0 10px 8px; font-size: 12px; font-weight: 600; color: var(--ink-3); }
.sp-menu-list { display: grid; gap: 2px; }
.sp-opt { display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 9px 10px; border-radius: 10px; text-align: left; }
.sp-opt:hover { background: var(--surface-2); }
.sp-opt[aria-pressed="true"] { background: var(--surface-3); }
.sp-opt .sw { width: 30px; height: 30px; border-radius: 9px; }
.sp-opt-t { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; line-height: 1.35; }
.sp-opt-t small { display: block; margin-top: 2px; font-size: 11.5px; font-weight: 450; color: var(--ink-2); }
.sp-check { width: 15px; height: 15px; color: var(--ink-2); visibility: hidden; }
.sp-opt[aria-pressed="true"] .sp-check { visibility: visible; }
.sp-menu-new { display: flex; align-items: center; gap: 10px; width: 100%; height: 42px; margin-top: 6px; padding: 0 12px; border-radius: 10px; box-shadow: 0 -1px 0 var(--line); font-size: 13.5px; font-weight: 560; color: var(--ink-2); }
.sp-menu-new:hover { background: var(--surface-2); color: var(--ink); }

/* ------------------------------------------------------------ signed out */
/* Nothing of the space shows: the nav keeps only the brand and Sign in, over a sky of no space's. */
body.signed-out main, body.signed-out .ad, body.signed-out :is(.nav-slash, .sp-switch-wrap, .nav nav, .nav-av) { display: none; }
.nav-signin { display: none; margin-left: auto; height: 38px; padding: 0 17px; font-size: 14px; }
body.signed-out .nav-signin { display: inline-flex; }
.so { position: relative; isolation: isolate; display: grid; place-items: center; min-height: 100vh; padding: 110px var(--gut) 140px; }
.so > :not(.dz) { position: relative; z-index: 1; }
.win.so-card { display: grid; justify-items: center; gap: 8px; width: min(420px, 100%); padding: 36px 32px 26px; text-align: center; }
.so-card img { width: 44px; height: 44px; margin-bottom: 10px; }
.so-card h1 { font: 550 26px/1.2 var(--head); letter-spacing: -.03em; text-wrap: balance; }
.so-card p { font-size: 14.5px; color: var(--ink-2); text-wrap: pretty; }
.so-card .a-btn { width: 100%; height: 42px; margin-top: 16px; font-size: 14.5px; }
.so-card .so-new { margin-top: 6px; font-size: 13px; color: var(--ink-3); }
.so-new button { font-weight: 600; color: var(--blue); }
.so-new button:hover { text-decoration: underline; }
.home-agent-setup { width: 100%; min-width: 0; margin-top: 14px; padding-top: 18px; border-top: 1px solid var(--line); text-align: start; }
.home-agent-setup h2 { margin-bottom: 8px; font: 550 17px/1.3 var(--head); }
.home-agent-setup pre { margin: 6px 0 10px; padding: 8px 10px; border-radius: 8px; background: var(--paper); white-space: pre-wrap; overflow-wrap: anywhere; }
.home-agent-local { border-top: 1px solid var(--line); padding-top: 6px; }
.home-agent-local summary { cursor: pointer; padding-block: 4px; color: var(--blue); font-size: 14px; font-weight: 600; }
.home-agent-local summary:hover { text-decoration: underline; }
.home-agent-local pre { margin-bottom: 0; }

@media (max-height: 960px) {
  .so:has(.home-agent-setup) { padding-block: 84px 64px; }
  .win.so-card:has(.home-agent-setup) { gap: 6px; padding-block: 24px 20px; }
  .so-card:has(.home-agent-setup) img { margin-bottom: 4px; }
  .so-card:has(.home-agent-setup) .a-btn { margin-top: 10px; }
  .home-agent-setup { margin-top: 10px; padding-top: 12px; }
  .home-agent-setup h2 { margin-bottom: 4px; }
  .home-agent-setup pre { padding-block: 6px; font-size: 13px; line-height: 1.5; }
}

/* ------------------------------------------------------------ header: the space's sky */
.sp-head { position: relative; isolation: isolate; color: #fff; padding: 100px 0 76px; }
.sp-head[data-tone="light"] { color: var(--ink); }
.sp-head > :not(.dz) { position: relative; z-index: 1; }
.sp-hero { display: grid; grid-template-columns: minmax(0, 1fr) 368px; gap: 48px; align-items: end; transition: opacity .25s var(--ease), transform .35s var(--ease); }
.sp-hero-main { display: grid; justify-items: start; min-width: 0; }
#sp-connect { min-width: 0; color: var(--ink); }
.sp-head.is-denied .sp-hero { grid-template-columns: 1fr; }
.sp-head.is-switching .sp-hero { opacity: 0; transform: translateY(6px); transition-duration: .12s; }
.sp-role { margin-bottom: 14px; padding: 6px 13px 6px 11px; font-size: 13px; }
.sp-role .ic { width: 14px; height: 14px; }
.sp-name { font: 500 clamp(40px, 4.4vw, 64px)/.95 var(--head); letter-spacing: -.045em; text-wrap: balance; }
.sp-head[data-tone="dark"] .sp-name { text-shadow: 0 2px 40px rgba(6, 11, 41, .4); }
.sp-meta { margin-top: 10px; font-size: 16px; opacity: .9; }
.sp-head[data-tone="dark"] .sp-meta { text-shadow: 0 1px 2px rgba(6, 11, 41, .5), 0 2px 24px rgba(6, 11, 41, .55); }
.sp-meta b { font-weight: 600; }
.sp-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; width: 100%; margin-top: 22px; }
.sp-head.is-denied .sp-tools, .sp-head.is-denied .sp-meta { display: none; }

.sp-search { flex: 0 1 540px; display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 12px 0 18px; border-radius: 999px; background: rgba(255, 255, 255, .92); color: var(--ink); box-shadow: 0 10px 30px -12px rgba(3, 6, 25, .5); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); cursor: text; transition: box-shadow .2s; }
.sp-head[data-tone="light"] .sp-search { box-shadow: inset 0 0 0 1px rgba(12, 17, 48, .1), 0 10px 30px -14px rgba(12, 20, 64, .35); }
.sp-search:focus-within { box-shadow: 0 0 0 2px var(--blue), 0 10px 30px -12px rgba(3, 6, 25, .5); }
.sp-search .ic { width: 18px; height: 18px; color: var(--ink-2); }
.sp-search input { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: 0; background: none; font-size: 15.5px; }
.sp-search input::placeholder { color: var(--ink-3); }
.sp-search input:disabled { cursor: not-allowed; }
.sp-search kbd { display: grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 7px; box-shadow: inset 0 0 0 1px var(--line-2); font: 600 12px var(--sans); color: var(--ink-3); }
.sp-search:focus-within kbd, .sp-search.has-q kbd { visibility: hidden; }
.sp-tools .btn img { width: 16px; height: 16px; }
.sp-head[data-tone="light"] .btn-glass { background: rgba(255, 255, 255, .42); color: var(--ink); box-shadow: inset 0 0 0 1px rgba(12, 17, 48, .14); }
.sp-head[data-tone="light"] .btn-glass:hover { background: rgba(255, 255, 255, .62); }

/* ------------------------------------------------------------ body on paper */
.sp-body { padding: 8px 0 150px; }
.sec-row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.sec-t { font: 550 23px/1.2 var(--head); letter-spacing: -.03em; }
.sec-t small { margin-left: 8px; font: 500 14px var(--sans); letter-spacing: 0; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.sec-link { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 560; color: var(--ink-2); text-decoration: none; }
.sec-link .ic { width: 14px; height: 14px; transition: transform .25s var(--spring); }
.sec-link:hover { color: var(--ink); }
.sec-link:hover .ic { transform: translateX(3px); }

/* recent artifact preview images */
.rec-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.rc { display: grid; align-content: start; gap: 5px; color: inherit; text-decoration: none; border-radius: 18px; }
.rc-preview { display: block; aspect-ratio: 16 / 9; min-width: 0; margin-bottom: 9px; overflow: hidden; border-radius: 14px; box-shadow: 0 0 0 1px var(--line); }
.rc-preview img { display: block; width: 100%; height: 100%; object-fit: cover; }
.live-recent-preview { position: relative; background: var(--surface-2); }
.live-recent-placeholder { position: absolute; inset: 0; display: grid; place-items: center; }
.live-recent-placeholder[hidden] { display: none; }
.live-recent-placeholder .tile { width: 44px; height: 44px; border-radius: 12px; }
.live-recent-preview img { position: absolute; inset: 0; opacity: 0; }
.live-recent-preview[data-thumbnail-state="ready"] img { opacity: 1; }
.rc-s { display: flex; align-items: center; gap: 8px; min-width: 0; padding-left: 2px; font-size: 13.5px; font-weight: 560; }
.rc-w { display: flex; align-items: center; gap: 6px; padding-left: 2px; font-size: 12.5px; color: var(--ink-3); }

.personal-pin-list { margin-block: 24px; }
.personal-pin-list .sec-row { flex-wrap: wrap; gap: 8px 12px; }
.personal-pin-list :is(.rc-s, .rc-w, [role="status"]) { overflow-wrap: anywhere; }
.personal-pin-list :is(.rc-w, [role="status"]) { color: var(--ink-muted); }
.personal-pin-list [role="status"] { font-size: 13px; }
.personal-pin-list [role="status"] + .a-btn { margin-top: 8px; }

/* full-width library */
.sp-grid { margin-top: 60px; }
.sp-grid.flush { margin-top: 12px; }
.panel, .card { border-radius: var(--r-win); background: #fff; box-shadow: inset 0 0 0 1px var(--line), 0 1px 2px rgba(12, 20, 64, .04), 0 18px 40px -30px rgba(12, 20, 64, .35); }
.panel { overflow: hidden; }

.lib-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; padding: 20px 22px 16px; }
.lib-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-left: auto; }
.imp-btn.a-btn.sm { height: 30px; padding: 0 13px 0 11px; border-radius: 999px; }
.sort { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-3); }
.sort select { height: 30px; padding: 0 30px 0 12px; border: 0; border-radius: 999px; background: var(--surface-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23464d68' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E") right 10px center / 13px no-repeat; -webkit-appearance: none; appearance: none; font-size: 13px; font-weight: 600; cursor: pointer; }

.lib { --cols: minmax(0, 1.8fr) minmax(0, .8fr) minmax(0, 1fr) minmax(0, 1.1fr) 82px 32px; }
.lib-cols, .row { display: grid; grid-template-columns: var(--cols); gap: 16px; align-items: center; padding: 0 22px; }
.lib-cols { height: 34px; border-block: 1px solid var(--line); background: color-mix(in srgb, var(--paper) 55%, white); font-size: 11.5px; font-weight: 600; color: var(--ink-3); }
.lib-cols > span:last-child { text-align: right; }
.type-col { position: relative; display: flex; align-items: center; justify-self: start; max-width: 100%; border-radius: 6px; }
.type-trigger { display: inline-flex; align-items: center; gap: 4px; min-height: 28px; max-width: 100%; color: var(--ink-2); white-space: nowrap; }
.type-trigger .ic { flex: none; width: 13px; height: 13px; }
.type-col select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.type-col:focus-within { outline: 2px solid var(--focus-color); outline-offset: 1px; }
.type-col:has(select:disabled) { opacity: .5; }
.type-col select:disabled { cursor: default; }
.row { position: relative; min-height: 68px; padding-block: 10px; border-bottom: 1px solid var(--line); transition: background .15s; }
.row:hover { background: color-mix(in srgb, var(--paper) 60%, white); }
.r-name { display: flex; align-items: center; gap: 12px; min-width: 0; }
.r-name .tile { width: 32px; height: 32px; border-radius: 9px; }
.r-name .tile svg { width: 18px; height: 18px; }
.row-link { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14.5px; font-weight: 600; color: inherit; text-decoration: none; }
.row-link::after { content: ''; position: absolute; inset: 0; }
.row:has(.row-link) { cursor: pointer; }
.row:has(.row-link:focus-visible) { outline: 2px solid var(--focus-color); outline-offset: -2px; }
.row-link:focus-visible { outline: none; }
.owner { display: inline-flex; align-items: center; gap: 7px; min-width: 0; font-size: 12.5px; color: var(--ink-2); }
.owner .av { --s: 20px; font-size: 9px; }
.owner > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row mark, .rc mark { padding: 1px 0; border-radius: 3px; background: #fbe9b9; color: inherit; }
.r-type { min-width: 0; }
.upd { display: grid; gap: 3px; font-size: 13px; color: var(--ink-2); }
.by { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-3); }
.by .by-agent { display: block; flex: none; width: 16px; height: 16px; border-radius: 4px; }
.by .ic { width: 13px; height: 13px; }
.shr { font-size: 12.5px; color: var(--ink-3); }
.shr .avs .av { box-shadow: 0 0 0 2px #fff; }
.shr .more { margin-left: 4px; font-size: 11.5px; font-weight: 600; }
.acts { position: relative; z-index: 1; display: flex; justify-content: flex-end; align-items: center; gap: 2px; }
.icon-btn { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; color: var(--ink-3); transition: background .15s, color .15s; }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.lib-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 10px 22px; font-size: 12.5px; color: var(--ink-muted); overflow-wrap: anywhere; }
/* the next page on its way: placeholder rows above, a spinner here */
.lib-foot.is-loading { justify-content: center; color: var(--ink-2); }
.lib-loading { display: inline-flex; align-items: center; gap: 9px; font-weight: 560; }

/* status dots beyond the site's ok / ac / need */
.dot.bad { background: var(--coral); box-shadow: 0 0 0 3px rgba(251, 101, 90, .18); }
.dot.mute { background: #a3a8bc; box-shadow: 0 0 0 3px rgba(133, 139, 163, .16); }
.dot.live { animation: live 1.8s ease-in-out infinite; }
@keyframes live { 50% { box-shadow: 0 0 0 6px rgba(31, 95, 229, .05); } }

/* skeleton */
.sk { display: block; border-radius: 8px; background: linear-gradient(90deg, var(--surface-2) 30%, var(--surface-3) 50%, var(--surface-2) 70%) 0 0 / 220% 100%; animation: sk 1.3s linear infinite; }
@keyframes sk { to { background-position: -220% 0; } }
.rc .sk.sky { aspect-ratio: 16 / 9; margin-bottom: 9px; border-radius: 18px; }
.recent-title-skeleton { height: 12px; width: 60%; }
.row .sk { height: 12px; }
.sk-row .sk-icon { width: 32px; height: 32px; border-radius: 9px; flex: none; }
.sk-row .sk-title { width: 54%; }
.sk-row:nth-child(even) .sk-title { width: 72%; }
.sk-row > .sk:nth-child(2) { width: 62%; }
.sk-row > .sk:nth-child(3) { width: 55%; }
.sk-row > .sk:nth-child(4) { width: 48%; }
.sk-row > .sk:nth-child(5) { width: 52px; }
.sk-row > .sk:last-child { width: 24px; justify-self: end; }

.space-denied { margin-top: 12px; }
.space-denied > .state { padding: 88px 24px 96px; }

/* empty space */
.es { padding: 26px 26px 28px; }
.es-t h3 { font: 550 28px/1.12 var(--head); letter-spacing: -.035em; text-wrap: balance; }
.es-t > p { margin-top: 8px; font-size: 15px; color: var(--ink-2); }
/* the two ways to fill it: two windows on one sky */
.es-sky { position: relative; isolation: isolate; display: grid; grid-template-columns: repeat(2, minmax(0, 420px)); justify-content: center; align-items: stretch; gap: 20px; margin-top: 22px; padding: 44px 28px; border-radius: 18px; overflow: hidden; }
.es-sky > .win { position: relative; z-index: 1; }
.es-imp { display: flex; flex-direction: column; }
.import-tile { --c: #2f9e7a; }
.es-drop { flex: 1; display: grid; place-content: center; justify-items: center; gap: 6px; margin: 14px; padding: 20px 18px; border-radius: var(--r-ctl); background: var(--surface-solid); box-shadow: inset 0 0 0 1.5px var(--line-2); text-align: center; transition: background .15s, box-shadow .15s; }
.es-drop > .ic { width: 22px; height: 22px; margin-bottom: 4px; color: var(--ink-3); }
.es-drop b { font-size: 14px; font-weight: 620; }
.es-drop p { max-width: 26em; font-size: 12.5px; line-height: 1.5; color: var(--ink-2); }
.es-drop .a-btn { margin-top: 8px; }
.es-drop.is-over { background: color-mix(in srgb, var(--blue) 8%, white); box-shadow: inset 0 0 0 2px var(--blue); }
/* while it's empty the header has no Connect card: the title takes the width */
.sp-head.no-connect .sp-hero { grid-template-columns: 1fr; }

/* ------------------------------------------------------------ side column */
.side { display: grid; gap: 16px; }
.card { padding: 18px; }
.card-h { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; }
.card-h b { font: 600 17px/1.2 var(--head); letter-spacing: -.02em; }
.card-h .n { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--ink-3); }
.pill { padding: 2px 8px; border-radius: 999px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); font-size: 10.5px; font-weight: 650; color: var(--ink-3); }
.card .sec-link { margin-top: 12px; font-size: 13px; }
.quiet { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--ink-2); }

.need { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 5px 10px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.need:first-of-type { padding-top: 2px; border-top: 0; }
.need-t { display: grid; min-width: 0; font-size: 13.5px; line-height: 1.35; }
.need-t b { font-weight: 620; }
.need-t span { font-size: 12.5px; font-weight: 600; }
.t-ac { color: var(--blue); }
.t-need { color: var(--need); }
.need > p, .need > .meter { grid-column: 2 / 4; }
.need > p { font-size: 12.5px; line-height: 1.5; color: var(--ink-2); }
.need > .meter { height: 4px; margin-top: 3px; }
.need .dot { margin-right: 8px; }

/* connect: a glass window on the header's sky, the same material as the recent cards */
.connect.flash { animation: flash 1.2s var(--ease); }
@keyframes flash { 20% { box-shadow: var(--win-shadow), inset 0 0 0 2px var(--blue); } }
.connect-tile { --c: #1f3a63; }
.connect .win-bar .tile svg { width: 13px; height: 13px; }
/* the agents' logos drift left in a loop, fading at both ends; the track holds the row twice,
   so moving it by half lands on the same picture. Holds while the card is pointed at. */
.cn-logos { flex: 0 1 176px; min-width: 0; margin-left: auto; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 20px, #000 calc(100% - 20px), transparent); mask-image: linear-gradient(90deg, transparent, #000 20px, #000 calc(100% - 20px), transparent); }
.cn-track { display: flex; width: max-content; padding-block: 4px; animation: cn-drift 26s linear infinite; }
.connect:hover .cn-track, .connect:focus-within .cn-track { animation-play-state: paused; }
@keyframes cn-drift { to { transform: translateX(-50%); } }
.cn-logos .ag { width: 22px; height: 22px; margin-right: 6px; border-radius: 7px; }
.cn-logos .ag img { width: 13px; height: 13px; }
.cn-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 14px 14px 14px; } /* the steps' one line can't widen the card */
.cn-steps { display: flex; align-items: center; gap: 8px; counter-reset: s; font-size: 13px; font-weight: 600; white-space: nowrap; }
.cn-steps li { display: flex; align-items: center; gap: 7px; counter-increment: s; }
.cn-steps li::before { content: counter(s); display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--ink); font-size: 10.5px; font-weight: 700; color: #fff; }
.cn-steps li + li::before { background: var(--surface-3); color: var(--ink-2); }
.cn-steps li + li { color: var(--ink-2); }
.cn-steps li:first-child::after { content: ""; width: 18px; height: 1.5px; margin-left: 1px; border-radius: 1px; background: var(--line-2); }
.prompt-copy { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 11px 12px 10px; border-radius: var(--r-ctl); background: var(--surface-solid); box-shadow: inset 0 0 0 1px var(--line); }
.prompt-text { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; font-size: 12.5px; line-height: 1.6; color: var(--ink-2); overflow-wrap: anywhere; }
.prompt-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 11.5px; color: var(--ink-3); }
.prompt-foot span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prompt-foot .a-btn .ic { width: 13px; height: 13px; }
.prompt-foot .a-btn.done { background: var(--ok); opacity: 1; }

/* ------------------------------------------------------------ design-review controls (not product UI) */
.dt { position: fixed; z-index: 70; left: 14px; bottom: 14px; display: grid; gap: 6px; padding: 9px 9px 9px; border-radius: 13px; background: rgba(12, 17, 48, .92); color: #fff; font-size: 12px; box-shadow: 0 14px 34px -12px rgba(3, 6, 25, .6); }
.dt-l { padding: 0 3px; font-weight: 650; opacity: .62; }
.dt-hint { padding: 0 3px; font-size: 11.5px; opacity: .5; }
.dt-seg { display: flex; flex-wrap: wrap; max-width: 470px; gap: 2px; padding: 2px; border-radius: 9px; background: rgba(255, 255, 255, .08); }
.dt-seg button { height: 26px; padding: 0 10px; border-radius: 7px; font-size: 12px; font-weight: 600; color: rgba(255, 255, 255, .72); }
.dt-seg button:hover { color: #fff; }
.dt-seg [aria-pressed="true"] { background: #fff; color: var(--ink); }

.artifact-menu { position: fixed; z-index: 90; width: 186px; padding: 6px; border-radius: 12px; background: #fff; box-shadow: 0 16px 40px -16px rgba(12, 20, 64, .4), 0 0 0 1px var(--line); }
.artifact-menu button { display: block; width: 100%; min-height: 36px; padding: 0 11px; border-radius: 8px; text-align: left; font-size: 13px; font-weight: 550; color: var(--ink); }
.artifact-menu button:hover, .artifact-menu button:focus-visible { background: var(--surface-2); }
.artifact-menu button:focus-visible { outline-offset: -2px; }
.artifact-menu button.danger { margin-top: 4px; color: var(--error-text); }
.artifact-menu button.danger:hover, .artifact-menu button.danger:focus-visible { background: var(--error-surface); }
/* greyed (Duplicate when the artifact doesn't allow copies): still focusable, does nothing, says why */
.artifact-menu .mi-off { display: none; }
.artifact-menu button[aria-disabled="true"] { display: flex; align-items: center; color: var(--ink-3); cursor: default; }
.artifact-menu button[aria-disabled="true"]:hover { background: none; }
.artifact-menu button[aria-disabled="true"] .mi-off { display: inline; }

/* import: a card at the bottom right, one line per file; finished files open on click */
.imp { position: fixed; z-index: 75; right: 14px; bottom: 14px; width: 340px; border-radius: 14px; background: #fff; box-shadow: 0 22px 50px -20px rgba(12, 20, 64, .45), 0 0 0 1px var(--line); overflow: hidden; animation: imp-in .45s var(--spring); }
@keyframes imp-in { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.imp-head { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 9px 0 15px; border-bottom: 1px solid var(--line); }
.imp-head b { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 650; }
.imp-head .spin { flex: none; }
.imp-pct { font-size: 12px; font-weight: 600; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.imp-ok { flex: none; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--ok); color: #fff; animation: imp-ok .5s var(--spring); }
.imp-ok .ic { width: 11px; height: 11px; stroke-width: 3; }
@keyframes imp-ok { from { transform: scale(.4); } }
.imp-list { max-height: 280px; overflow-y: auto; padding: 6px; }
.imp-f { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 2px 11px; width: 100%; padding: 9px 8px; border-radius: 10px; text-align: left; }
.imp-f .tile { grid-row: span 2; width: 30px; height: 30px; border-radius: 9px; }
.imp-f .tile svg { width: 16px; height: 16px; }
.imp-n { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 600; }
.imp-sub { grid-column: 2; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.imp-f .meter { grid-column: 2 / 4; height: 4px; margin-top: 5px; }
.imp-f .meter i { width: 0; transition: width .12s linear; }
.imp-f.is-ok:hover { background: var(--surface-2); }
.imp-go { grid-row: 1 / span 2; grid-column: 3; display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 620; color: var(--blue); }
.imp-go .ic { width: 13px; height: 13px; transition: transform .25s var(--spring); }
.imp-f.is-ok:hover .imp-go .ic { transform: translateX(2px); }
.imp-live-row .imp-sub { white-space: normal; overflow-wrap: anywhere; }
.imp-live-actions { grid-column: 2 / -1; display: flex; gap: 4px 8px; flex-wrap: wrap; }
.imp-live-row [data-import-quota-feedback] { grid-column: 2 / -1; min-width: 0; overflow-wrap: anywhere; }
.imp-live-row [data-import-quota-feedback] p { margin: 4px 0; font-size: 12px; }
/* a freshly imported row lights up once in the list */
.row.fresh { animation: fresh 2.4s var(--ease); }
@keyframes fresh { 0%, 35% { background: color-mix(in srgb, var(--blue) 9%, white); } }

/* scroll areas inside panels: a thin rounded thumb with no track, shown while you point at the
   area or scroll it with the keyboard; the page itself keeps the browser's scrollbar */
/* the share panel reserves the gutter, so its rows line up whether the list scrolls or not */
.ad-sh-list, .ad-sh-sug { scrollbar-gutter: stable; }
.ad-sh-list::-webkit-scrollbar, .ad-sh-sug::-webkit-scrollbar, .rs-dw-b::-webkit-scrollbar, .imp-list::-webkit-scrollbar { width: 10px; }
.ad-sh-list::-webkit-scrollbar-track, .ad-sh-sug::-webkit-scrollbar-track, .rs-dw-b::-webkit-scrollbar-track, .imp-list::-webkit-scrollbar-track { background: none; }
.ad-sh-list::-webkit-scrollbar-thumb, .ad-sh-sug::-webkit-scrollbar-thumb, .rs-dw-b::-webkit-scrollbar-thumb, .imp-list::-webkit-scrollbar-thumb { border: 3px solid transparent; border-radius: 99px; background: transparent padding-box; }
:is(.ad-sh-list, .ad-sh-sug, .rs-dw-b, .imp-list):is(:hover, :focus-within)::-webkit-scrollbar-thumb { background-color: rgba(12, 17, 48, .2); }
:is(.ad-sh-list, .ad-sh-sug, .rs-dw-b, .imp-list)::-webkit-scrollbar-thumb:hover { background-color: rgba(12, 17, 48, .34); }
@supports not selector(::-webkit-scrollbar) {
  .ad-sh-list, .ad-sh-sug, .rs-dw-b, .imp-list { scrollbar-width: thin; scrollbar-color: rgba(12, 17, 48, .2) transparent; }
}


/* 未确认的业务结果在相关页面内提示，按原请求查询。 */
.operation-result { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 12px 0; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--surface-solid); color: var(--ink-2); font-size: 13px; }
.operation-result > [role="status"] { flex: 1; min-width: 140px; }
/* 提示条落在列表面板或产物正文时保留自身高度和边距，不参与正文的等分伸展。 */
.panel > .operation-result { margin: 12px 14px 0; }
.ad-stage > .operation-result { flex: 0 0 auto; margin: 12px 16px 0; }

/* ------------------------------------------------------------ 创建副本抽屉 */
.copy-of { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.copy-form { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.copy-form > .operation-result { margin: 14px 22px 0; }
.copy-form .rs-dw-b { display: grid; align-content: start; gap: 20px; }
.copy-group { display: grid; gap: 8px; min-width: 0; }
.copy-label { font-size: 12px; font-weight: 650; letter-spacing: .02em; color: var(--ink-3); }
/* 目的地沿用设置页的空间下拉，按钮与菜单同宽。 */
.copy-spbtn { width: 100%; }
.copy-spbtn:disabled { opacity: .55; cursor: not-allowed; }
.copy-spbtn:disabled:hover { background: none; }
.copy-space-v { display: contents; }
.artifact-menu.set-space-menu.copy-space-menu { width: min(356px, calc(100vw - 64px)); max-height: min(320px, calc(100vh - 32px)); overflow-y: auto; overscroll-behavior: contain; }
.copy-option { display: flex; align-items: flex-start; gap: 11px; padding: 11px 12px; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line-2); cursor: pointer; transition: background .15s; }
.copy-option:hover { background: var(--surface-2); }
.copy-option .ad-check { margin: 1px 0 0; }
.copy-option-t { display: grid; gap: 2px; min-width: 0; }
.copy-option-t b { font-size: 13.5px; font-weight: 600; }
.copy-option-t small { font-size: 12.5px; line-height: 1.45; color: var(--ink-3); }
.copy-option:has(input:disabled) { cursor: default; }
.copy-option:has(input:disabled):hover { background: none; }
.copy-option:has(input:disabled) b { color: var(--ink-3); }
.copy-note { font-size: 13px; line-height: 1.5; color: var(--ink-2); text-wrap: pretty; }
.copy-done { display: grid; align-content: center; justify-items: center; gap: 12px; text-align: center; }
.copy-done p { font-size: 14.5px; font-weight: 600; }
.copy-done-ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--ok); color: #fff; }
.copy-done-ic .ic { width: 20px; height: 20px; stroke-width: 2.6; }
.copy-done-f { gap: 8px; }

/* 应用副本的发布进度沿用上传卡片（.imp）的外观；两张卡同时出现时让到左下角。 */
.copy-progress { z-index: 74; }
body:has(#imp:not([hidden])) .copy-progress { right: auto; left: 14px; }
.copy-progress-tile { display: contents; }
.copy-progress a.a-btn, .copy-done-f a.a-btn { text-decoration: none; }

/* ------------------------------------------------------------ narrower screens */
@media (max-width: 1180px) {
  .lib { --cols: minmax(120px, 1.8fr) minmax(72px, .8fr) minmax(70px, .9fr) minmax(90px, 1.1fr) 84px 32px; }
}
@media (max-width: 1040px) {
  .rec-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .recent-shortcut-list .rec-grid { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: calc((100% - 20px) / 2); overflow-x: auto; }
  .es-sky { grid-template-columns: minmax(0, 1fr); padding: 24px 18px; }
}
@media (max-width: 760px) {
  .es { padding: 20px 16px; }
  .es-t h3 { font-size: 24px; }
  .es-sky { gap: 14px; margin-top: 18px; padding: 14px 12px; }
  /* in a narrow window the two steps take two lines */
  .es-sky .cn-steps { flex-wrap: wrap; row-gap: 6px; white-space: normal; }
  .es-sky .cn-steps li:first-child::after { display: none; }
}
@media (max-width: 760px) {
  .nav-slash { display: none; }
  .nav-in { flex-wrap: wrap; height: auto; min-height: 62px; padding: 8px 0; gap: 3px 10px; }
  .brand span { display: none; }
  .sp-switch-wrap { flex: 1; min-width: 0; }
  .sp-switch { max-width: 100%; }
  .sp-switch b { overflow: hidden; text-overflow: ellipsis; }
  .sp-switch .ic { flex: none; }
  .sp-menu.win { position: fixed; top: 54px; left: var(--gut); width: min(320px, calc(100% - var(--gut) * 2)); }
  .nav nav { order: 1; width: 100%; margin-left: 0; }
  .nav-links a { display: flex; align-items: center; min-height: var(--touch-target); }
  .nav-av { flex: none; margin-left: auto; }
  .sp-head { padding: 108px 0 64px; }
  .sp-hero { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .sp-meta { font-size: 15px; }
  .sp-tools { margin-top: 22px; }
  .sp-search { flex: 1 1 100%; }
  .sp-tools .btn { flex: 1; justify-content: center; height: 46px; padding: 0 14px; font-size: 14.5px; }
  .rec-grid { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 78%; overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: calc(var(--gut) * -1); padding: 0 var(--gut) 6px; scrollbar-width: none; }
  .recent-shortcut-list .rec-grid { grid-auto-columns: 78%; }
  .rec-grid > * { scroll-snap-align: center; }
  .personal-pin-list .a-btn { min-height: var(--touch-target); }
  .sp-grid { margin-top: 40px; }
  .lib-cols { display: flex; justify-content: flex-start; height: 42px; padding-inline: 16px; }
  .lib-cols > span:not(.type-col) { display: none; }
  .lib .row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "n a" "t a" "o a" "u a" "c a"; gap: 6px 12px; padding: 12px 16px; }
  .lib .r-name { grid-area: n; }
  .lib .r-type { grid-area: t; padding-left: 44px; }
  .lib .owner { grid-area: o; padding-left: 44px; }
  .lib .owner::before { content: "Owner"; font-size: 11px; color: var(--ink-3); }
  .lib .acts { grid-area: a; }
  .lib .upd { grid-area: u; display: flex; align-items: center; gap: 8px; padding-left: 44px; font-size: 12px; }
  .lib .sk-row .c-shr { display: none; }
  .lib .row:not(.sk-row) .c-shr { grid-area: c; display: flex; align-items: center; gap: 7px; padding-left: 44px; }
  .lib .row:not(.sk-row) .c-shr::before { content: "Collaborator"; font-size: 11px; color: var(--ink-3); }
  .lib-head, .lib-foot { padding-inline: 16px; }

  .dt { left: 10px; right: 10px; bottom: 10px; }
  .dt-hint { display: none; }
  .dt-seg { flex-wrap: wrap; }
  .dt-seg button { flex: 1 0 auto; padding: 0 6px; }
  .state-a .a-btn, .artifact-menu button { min-height: var(--touch-target); }
  .imp { left: 10px; right: 10px; bottom: 92px; width: auto; }
  .imp-live-actions .a-btn { min-height: var(--touch-target); }
  body:has(#imp:not([hidden])) .copy-progress { left: 10px; right: 10px; top: 64px; bottom: auto; }
  .copy-form .set-spbtn, .copy-option { min-height: var(--touch-target); }
}
@media (max-width: 640px) {
  .cn-logos {
    min-width: 72px;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 8px, #000 calc(100% - 8px), transparent);
    mask-image: linear-gradient(90deg, transparent, #000 8px, #000 calc(100% - 8px), transparent);
  }
  #sp-search { padding-right: 10px; }
  #sp-search input { font-size: 16px; }
  #sp-search kbd { display: none; }
}
.sp-body:has(> [data-application-access-standalone]) { padding-top: 24px; }
body:has(.sp-body > [data-application-access-standalone]) :is(#sp-head, #nav) { display: none; }
