/* A world's menu of agents and an org's menu of worlds (world_page.py): a launcher, not a page to read.
   The tokens are artificialbeings.ai's (marketing/public/styles.css). No fonts are loaded and no script runs. */
:root {
  color-scheme: dark;
  --bg: #07070a;
  --surface: #111116;
  --ink: #f2f0ef;
  --muted: #b0aeb9;
  --quiet: #9692a3;
  --line: #292731;
  --accent: #ddd0f2;
  --link: #dfd5eb;
  --edge: #393441;
  --edge-hover: #5d5270;
  --chip-edge: #4a4257;
  --error: #f0b7c4;
  --error-edge: #5a3340;
  --ok: #c5e6db;
  --ok-edge: #2f4a40;
  --rainbow: linear-gradient(105deg, #eee7cc, #dfc9e8 30%, #b9ccec 60%, #c5e6db 85%, #eee4cd);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;
  --pad: clamp(20px, 4.85vw, 80px);
}
* { box-sizing: border-box; }
html { background: var(--bg); }
/* A faint horizon above the menu: the world is a place you have arrived in. */
body { margin: 0; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; color: var(--ink);
  font: 400 16px/1.6 var(--font); -webkit-font-smoothing: antialiased;
  background: radial-gradient(1100px 520px at 50% -8%, #17131f 0%, rgba(7, 7, 10, 0) 70%), var(--bg); }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
h1, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
::selection { background: #d6c8ec; color: #15111a; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; border-radius: 3px; }
[tabindex="-1"]:focus { outline: none; }
.skip { position: absolute; top: 10px; left: 18px; z-index: 20; padding: 10px 16px; background: var(--ink); color: var(--bg); transform: translateY(-160%); }
.skip:focus { transform: none; color: var(--bg); }

.site-header { width: 100%; max-width: 1440px; margin: 0 auto; padding: 18px var(--pad); min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { min-height: 44px; display: inline-flex; align-items: center; flex-shrink: 0; }
.wordmark { width: 200px; opacity: .9; }
.crumbs { display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--quiet); font: 13px/1.4 var(--mono); }
.crumbs a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px; margin: 0 -6px; color: var(--muted); }
.crumbs a:hover { color: #fff; }
.crumbs [aria-current] { color: var(--ink); }

/* The menu: the world's name, one line, the agents. Nothing else asks to be read. */
.menu { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  width: 100%; max-width: 1240px; margin: 0 auto; padding: 16px var(--pad) clamp(48px, 9vh, 96px); }
.menu-title { font-size: clamp(52px, 6.4vw, 92px); font-weight: 300; line-height: 1; letter-spacing: -.045em; color: #e6e0ef; }
@supports ((background-clip: text) or (-webkit-background-clip: text)) {
  .menu-title { background: var(--rainbow); -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: .06em; }
}
.menu-subtitle { margin-top: 14px; color: var(--muted); font-size: 18px; }
/* Said before the choice, quietly: on a public world, others see what you type. */
.menu-note { margin-top: 10px; color: var(--quiet); font-size: 13px; text-wrap: balance; }
/* The choices: centred rows that wrap, the last one centred too. Up to eight agents get large tiles; a big
   world gets smaller ones (tiles--many), and on a phone a list. */
.tiles { width: 100%; margin-top: clamp(40px, 6.5vh, 72px); display: flex; flex-wrap: wrap; justify-content: center; gap: 44px 28px; }
.tiles > li { flex: 0 1 240px; min-width: 0; display: flex; }
.tiles--many { gap: 34px 22px; }
.tiles--many > li { flex-basis: 172px; }
.tile { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; border-radius: 28px; }
.tile:focus-visible { outline: none; }
.tile-face { display: grid; place-items: center; width: 100%; aspect-ratio: 1; border: 1px solid var(--line); border-radius: 30px;
  background: radial-gradient(120% 110% at 30% 0%, #1a1623 0%, #0d0c12 58%, #09090c 100%);
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease; }
.emblem { width: 88%; height: auto; }
.tile:hover .tile-face { transform: translateY(-4px); border-color: var(--edge-hover); box-shadow: 0 18px 44px -22px rgba(221, 208, 242, .32); }
.tile:focus-visible .tile-face { outline: 2px solid var(--accent); outline-offset: 5px; }
.tile:active .tile-face { transform: translateY(-1px); }
.tile-words { flex: 1; display: flex; flex-direction: column; align-items: center; min-width: 0; }
.tile-name { margin-top: 18px; font-size: 17px; line-height: 1.35; letter-spacing: -.01em; }
.tile:hover .tile-name { color: #fff; }
.tile-line { margin-top: 6px; max-width: 100%; color: var(--quiet); font-size: 14px; line-height: 1.5; text-wrap: balance;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tiles--many .tile-face { border-radius: 24px; }
.tiles--many .tile-name { margin-top: 14px; font-size: 15px; }
.tiles--many .tile-line { font-size: 13px; }
.tile-state { margin-top: 10px; padding: 1px 10px; border: 1px solid var(--edge); border-radius: 999px; color: var(--muted); font-size: 12px; line-height: 20px; }
.tile--off .tile-face { opacity: .4; }
.tile--off .tile-name { color: var(--muted); }
.menu-empty { margin-top: 40px; color: var(--muted); }
/* The way on from trying (a world whose manifest says build_your_own): one quiet line under the agents, an outlined
   pill to start and a plain link, both to artificialbeings.ai. The tiles stay the page's main choice. */
.build { width: min(100%, 560px); margin-top: clamp(44px, 7vh, 72px); padding-top: 24px; border-top: 1px solid var(--line); }
.build-line { color: var(--muted); font-size: 15px; text-wrap: balance; }
.build-links { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 22px; margin-top: 14px; }
.build-start { display: inline-flex; align-items: center; min-height: 44px; padding: 0 22px; border: 1px solid var(--edge);
  border-radius: 999px; color: var(--ink); font-size: 14px; font-weight: 500; }
.build-start:hover { border-color: var(--edge-hover); background: var(--surface); }
.build-more { display: inline-flex; align-items: center; min-height: 44px; color: var(--link); font-size: 14px; }
.build-more:hover { color: #fff; text-decoration: underline; text-underline-offset: 5px; }
/* Whose copy a signed-in person talks to: as quiet as a state, the same for both, and on one line across a row
   (the tiles of a row are as tall as the tallest; the chip sits at the foot of each). */
.tile-chip { margin-top: auto; border-color: var(--chip-edge); }
.tile-words > :has(+ .tile-chip) { margin-bottom: 10px; }

/* An org where people sign in: one quiet slot at the right of the header. */
.site-header--account .crumbs { margin-left: auto; }
.account { display: flex; align-items: center; gap: 14px; flex-shrink: 0; font-size: 14px; }
.account-state { color: var(--quiet); }
.account-form { margin: 0; }
.account-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 2px; border: 0; background: none;
  color: var(--link); font: inherit; cursor: pointer; text-decoration: underline; text-decoration-color: var(--edge-hover);
  text-underline-offset: 4px; }
.account-link:hover { color: #fff; text-decoration-color: currentColor; }
.account-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }

/* One card on its own: the password page of an org where people sign in, and a sign-in that could not finish. */
.card { width: min(100%, 420px); padding: 36px 32px 32px; border: 1px solid var(--line); border-radius: 24px;
  background: radial-gradient(120% 110% at 30% 0%, #1a1623 0%, #0d0c12 58%, #09090c 100%); text-align: left; }
.card-title { font-size: 26px; font-weight: 400; line-height: 1.25; letter-spacing: -.02em; color: var(--ink); }
.card-line { margin-top: 10px; color: var(--muted); font-size: 15px; }
.card-button { display: flex; align-items: center; justify-content: center; min-height: 48px; margin-top: 24px;
  border-radius: 999px; background: var(--ink); color: var(--bg); font-weight: 500; }
.card-button:hover { background: #fff; }
.card-button:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.owner-form { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.owner-title { display: block; color: var(--quiet); font-size: 13px; }
.card-error { margin-top: 8px; color: var(--error); font-size: 13px; }
.owner-input { width: 100%; min-height: 44px; margin-top: 10px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--bg); color: var(--ink); font: inherit; }
.owner-input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.owner-input[aria-invalid="true"] { border-color: var(--error-edge); }
.owner-button { min-height: 44px; margin-top: 10px; padding: 0 18px; border: 1px solid var(--edge); border-radius: 999px;
  background: none; color: var(--muted); font: inherit; font-size: 14px; cursor: pointer; }
.owner-button:hover { color: #fff; border-color: var(--edge-hover); }
.owner-button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* The owner's list of published agents (/agents/). */
.directory { flex: 1; width: 100%; max-width: 1240px; margin: 0 auto; padding: 16px var(--pad) clamp(48px, 9vh, 96px); }
.directory-title { font-size: clamp(40px, 5vw, 64px); font-weight: 300; line-height: 1.05; letter-spacing: -.04em; color: #e6e0ef; }
.directory-line { margin-top: 10px; color: var(--muted); }
.agent-list { margin-top: 36px; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.agent-row { display: flex; flex-direction: column; height: 100%; padding: 22px 24px; border: 1px solid var(--line); border-radius: 20px;
  background: var(--surface); transition: border-color .2s ease; }
.agent-row:hover { border-color: var(--edge-hover); }
.agent-row:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.agent-row-top { display: flex; justify-content: space-between; gap: 12px; color: var(--quiet); font: 12px/1.6 var(--mono); }
.agent-state { padding: 0 9px; border: 1px solid var(--edge); border-radius: 999px; text-transform: capitalize; }
.agent-state--ready { color: var(--ok); border-color: var(--ok-edge); }
.agent-state--failed { color: var(--error); border-color: var(--error-edge); }
.agent-name { margin-top: 16px; font-size: 20px; line-height: 1.3; letter-spacing: -.01em; }
.agent-line { margin-top: 8px; color: var(--muted); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 3;
  -webkit-box-orient: vertical; overflow: hidden; }
.agent-copies { margin-top: 12px; color: var(--quiet); font: 12px/1.6 var(--mono); }
.agent-copies span { white-space: nowrap; }
.agent-open { margin-top: auto; padding-top: 18px; color: var(--link); font-size: 14px; }

@media (max-width: 600px) {
  .site-header { min-height: 64px; padding-top: 10px; padding-bottom: 10px; }
  .wordmark { width: 150px; }
  .menu { justify-content: flex-start; padding-top: 28px; }
  .menu-title { font-size: 52px; }
  .menu-subtitle { font-size: 16px; }
  .tiles { gap: 34px 16px; margin-top: 32px; }
  .tiles > li { flex-basis: calc(50% - 8px); }
  .tile-face { border-radius: 24px; }
  .tile-name { margin-top: 14px; font-size: 16px; }
  .tile-line { font-size: 13px; -webkit-line-clamp: 3; }
  /* A big world on a phone: one agent per row, its face beside its name. */
  .tiles--many { flex-direction: column; flex-wrap: nowrap; gap: 10px; text-align: left; }
  .tiles--many > li { flex-basis: auto; }
  .tiles--many .tile { flex-direction: row; align-items: center; gap: 14px; padding: 6px; border-radius: 18px; }
  .tiles--many .tile-face { width: 64px; flex: none; border-radius: 16px; }
  .tiles--many .tile-words { align-items: flex-start; }
  .tiles--many .tile-name { margin-top: 0; }
  .tiles--many .tile-line { -webkit-line-clamp: 2; margin-top: 2px; }
  .tiles--many .tile:hover .tile-face { transform: none; }
}
@media (max-width: 600px) {
  /* The account slot keeps its place: `Sign out` says it alone, and the row wraps before anything overlaps. */
  .site-header--account { gap: 0 14px; flex-wrap: wrap; }
  .account-state { display: none; }
  .card { padding: 28px 22px 24px; border-radius: 20px; }
  .card-title { font-size: 22px; }
}
@media (max-width: 360px) {
  :root { --pad: 14px; }
  .crumbs { font-size: 12px; gap: 6px; }
  .wordmark { width: 128px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
@media (forced-colors: active) {
  .tile-face, .card, .agent-row, .build-start { border-color: CanvasText; }
  /* The primary path stays filled, so `Sign in with email` still outranks the owner's small form. */
  .card-button { forced-color-adjust: none; background: ButtonText; color: ButtonFace; border: 1px solid ButtonText; }
  .card-button:focus-visible { outline-color: Highlight; }
  .menu-title { background: none; color: CanvasText; }
  .wordmark { forced-color-adjust: none; background: #07070a; padding: 5px; }
}
@media print {
  :root { color-scheme: light; --ink: #111; --muted: #444; --quiet: #555; --line: #ccc; }
  body { background: #fff; }
  .menu-title { background: none; color: #111; }
  .wordmark { filter: brightness(0); }
}
