/* Twist. One typeface, no accent color: the only color on a page comes from the tools. */

:root {
  color-scheme: dark;
  --bg: #0a0a0a;
  --stage: #0e0e10;
  --raised: #121214;
  --text: #ededed;
  --text-2: #d4d4d4;
  --muted: #a3a3a3;
  --label: #8a8a8a;
  --faint: #5a5a5a;
  --slash: #4a4a4a;
  --line: #222222;
  --border: #2e2e2e;
  --frame: #262626;
  --underline: #3a3a3a;
  --chip: #2a2a2a;
  --danger: #e5484d;
  --mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --col: 420px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-wrap: anywhere;
}

/* Settings switches between a short tab and a long one; keep its scrollbar so
   the column doesn't shift between them. Other pages only get one when they
   scroll, so the header reaches the edge. */
html:has(main.settings) {
  overflow-y: scroll;
}

a {
  color: inherit;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

::selection {
  background: #ededed;
  color: #0a0a0a;
}

:focus-visible {
  outline: 1px solid var(--text);
  outline-offset: 2px;
}

/* ---------- top bar ---------- */

/* One header on every page: the same height, the same left and right. */
:root {
  --head: 40px;
}
.bar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--head);
  padding: 0 16px;
  border-bottom: 1px solid #1c1c1c;
  background: #0a0a0aeb;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
}
/* The header stays put, so links to a heading land below it. */
html {
  scroll-padding-top: calc(var(--head) + 16px);
}
.crumbs {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  white-space: nowrap;
}
.crumbs a {
  text-decoration: none;
}
/* Breadcrumbs are split by a slash, drawn a touch heavier than the type's. */
.crumbs .sep {
  flex-shrink: 0;
  width: 1.5px;
  height: 13px;
  margin: 0 2px;
  border-radius: 1px;
  background: #4a4a4a;
  transform: rotate(20deg);
}
.crumbs a:not(.brand) {
  color: var(--label);
}
.crumbs a:not(.brand):hover {
  color: var(--text);
}
.crumbs .here {
  color: var(--text);
  font-weight: 400;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 500;
  text-decoration: none;
}
.mark {
  width: 14px;
  height: 14px;
  border-radius: 7px;
  background: var(--text);
  position: relative;
  flex-shrink: 0;
}
.mark::after {
  content: '';
  position: absolute;
  left: 6.25px;
  top: 2px;
  width: 1.5px;
  height: 5px;
  border-radius: 1px;
  background: var(--bg);
  transform-origin: 50% 5px;
  transform: rotate(40deg);
}
.nav {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--label);
  white-space: nowrap;
}
.nav a {
  text-decoration: none;
}
.nav a:hover {
  color: var(--text);
}

.avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--chip);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  line-height: 12px;
  flex-shrink: 0;
  overflow: hidden;
  text-transform: lowercase;
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.avatar.lg {
  width: 56px;
  height: 56px;
  font-size: 22px;
  line-height: 28px;
}

/* ---------- shared pieces ---------- */

.title {
  font-size: 28px;
  line-height: 34px;
  font-weight: 500;
  letter-spacing: 0.02em;
  margin: 0;
  color: var(--text);
}
.tagline {
  font-size: 14px;
  line-height: 22px;
  color: var(--muted);
  margin: 0;
}
.signals {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.signals span b {
  font-weight: 400;
  color: var(--text);
  margin-right: 6px;
}
.signals span {
  color: var(--label);
  white-space: nowrap;
}
.signals span b.after {
  margin: 0 0 0 6px;
}
/* No dividers on a profile: the person, their numbers and links are grouped by space. */
.person .signals {
  flex-wrap: wrap;
  row-gap: 6px;
  border: 0;
  padding: 0;
}
.person .details {
  border-top: 0;
  padding-top: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover {
  border-color: #4a4a4a;
}
.btn.primary {
  background: #ffffff;
  border-color: #ffffff;
  color: #0a0a0a;
  font-size: 14px;
  line-height: 18px;
  font-weight: 500;
  padding: 12px 14px;
}
.btn.primary .arrow {
  color: var(--faint);
  font-weight: 400;
}
.btn.primary:hover {
  background: #e6e6e6;
  border-color: #e6e6e6;
}
.btn.grow {
  flex: 1;
}
.btn.danger {
  color: var(--danger);
  border-color: #3a1c1d;
}
.btn.small {
  padding: 6px 10px;
  font-size: 12px;
}
.btn[disabled] {
  opacity: 0.4;
  pointer-events: none;
}
.actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 0 28px;
}
.actions .row {
  display: flex;
  gap: 8px;
}

.section-label {
  color: var(--faint);
  font-size: 12px;
  line-height: 16px;
  margin: 0 0 12px;
  font-weight: 400;
}

.uses {
  color: var(--label);
  font-size: 12px;
  line-height: 18px;
  margin: -12px 0 28px;
}

.details {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 12px;
  line-height: 16px;
}
.details .row {
  display: flex;
}
.details .k {
  width: 120px;
  flex-shrink: 0;
  color: var(--label);
}
.details .v {
  color: var(--text-2);
  min-width: 0;
  line-height: 18px;
}
.details .v a {
  text-decoration: underline 1px var(--underline);
  text-underline-offset: 3px;
}
.details .quiet {
  padding-top: 12px;
}
.quiet,
.quiet a,
.quiet button {
  color: var(--faint);
  background: none;
  border: 0;
  padding: 0;
  font-size: 12px;
  cursor: pointer;
  text-decoration: none;
}
.quiet button:hover,
.quiet a:hover {
  color: var(--label);
}

.prose {
  color: var(--text-2);
  font-size: 13px;
  line-height: 21px;
}
.prose p,
.prose ul,
.prose ol,
.prose pre,
.prose blockquote,
.prose h3 {
  margin: 0 0 12px;
}
.prose h3 {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  margin-top: 20px;
}
.prose a {
  text-decoration: underline 1px var(--underline);
  text-underline-offset: 3px;
}
.prose code {
  background: var(--raised);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 4px;
  font-size: 12px;
}
.prose pre {
  background: var(--raised);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  overflow: auto;
  line-height: 18px;
}
.prose pre code {
  background: none;
  border: 0;
  padding: 0;
}
.prose ul {
  padding-left: 18px;
}
.prose ol {
  list-style: none;
  counter-reset: step;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin-top: 10px;
}
.prose ol li {
  counter-increment: step;
  display: flex;
  gap: 12px;
}
.prose ol li::before {
  content: counter(step);
  color: var(--faint);
  width: 16px;
  flex-shrink: 0;
}
.prose blockquote {
  border-left: 1px solid var(--border);
  padding-left: 12px;
  color: var(--muted);
}
.prose hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 20px 0;
}

/* ---------- tool page ---------- */
/* The tool gets the window. Twist keeps one slim bar under it, never on it,
   and the bar opens a sheet with everything else. */

.pill {
  font-size: 11px;
  line-height: 14px;
  letter-spacing: 0.04em;
  color: var(--label);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 8px;
  font-weight: 400;
  vertical-align: middle;
  white-space: nowrap;
}
.pill.warn {
  color: #f0b65a;
  border-color: #4a3a1c;
}

:root {
  --tf-bar: 34px;
}
body.tool-page {
  overflow: hidden;
}
.tf {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
}
/* Desktop chrome: one tight line above the tool. Phones go without it. */
:root {
  --tf-top: var(--head);
}
.tf-top {
  position: relative;
  z-index: 33;
  background: var(--bg);
}
.crumbs .vis-dot {
  width: 6px;
  height: 6px;
  border: 0;
  flex-shrink: 0;
}

/* The pull tab: a small handle on the left edge. Drag it up or down out of the
   tool's way; click it to open the panel, and it rides on the panel's edge. */
.tf-pull {
  display: none;
}
@media (min-width: 1024px) {
  .tf-pull {
    position: fixed;
    z-index: 34;
    top: calc(50% - 28px);
    left: 0;
    width: 14px;
    height: 56px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid #2e2e2e;
    border-left: 0;
    border-radius: 0 10px 10px 0;
    background: var(--bg);
    color: #5a5a5a;
    cursor: grab;
    touch-action: none;
    box-shadow: 4px 0 14px rgba(0, 0, 0, 0.35);
    transition:
      left 0.38s cubic-bezier(0.2, 0.8, 0.2, 1),
      width 0.15s ease,
      color 0.15s ease;
  }
  .tf-pull .grip {
    width: 2px;
    height: 16px;
    border-radius: 1px;
    background: currentColor;
  }
  .tf-pull:hover,
  .tf-pull:focus-visible {
    width: 18px;
    color: var(--text);
    outline: none;
  }
  .tf-pull.dragging {
    cursor: grabbing;
    color: var(--text);
  }
  body.sheet-open .tf-pull {
    left: calc(var(--panel-w) - 1px);
    color: var(--text);
  }
}
@media (prefers-reduced-motion: reduce) {
  .tf-pull {
    transition: none;
  }
}

/* Wide screens: a slim header on top, and a pull tab on the left edge that
   opens the sheet as a panel docked to that edge, full height under the header.
   The panel takes about a third of the window, so the tool stays in view;
   narrower than 1024px, the details come up from the bottom instead. */
:root {
  --panel-w: clamp(360px, 32vw, 460px);
}
@media (min-width: 1024px) {
  .tf .tf-dock {
    display: none;
  }
  .tf .sheet {
    top: var(--tf-top);
    bottom: 0;
    left: 0;
    width: var(--panel-w);
    max-height: none;
    border: 0;
    border-right: 1px solid #2a2a2a;
    border-radius: 0;
    box-shadow: 24px 0 60px rgba(0, 0, 0, 0.45);
    /* It slides out of the left edge, where the pull tab is. */
    transform: translateX(calc(-100% - 60px));
  }
  body.sheet-open .tf .sheet {
    transform: none;
  }
  /* The panel is always full height; halfway is only for the bottom sheet. */
  body.sheet-full .tf .sheet {
    max-height: none;
  }
  .tf .sheet-grab {
    display: none;
  }
  .tf .sheet-scroll {
    flex: 1;
    display: flex;
    flex-direction: column;
  }
  .tf .sh-head {
    padding-top: 22px;
  }
  /* short content: the twist strip still sits at the bottom of the panel */
  .tf .sh-brand {
    margin-top: auto;
    border-bottom: 0;
  }
}
@media (max-width: 600px) {
  .tf-top {
    display: none;
  }
}

.tf-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  background: var(--stage);
}
.tf-stage iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: var(--stage);
}
.stage-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--label);
  text-align: center;
  padding: 24px;
  line-height: 20px;
}

/* The dock: a strip under the tool with one tab in the middle. The sheet is the
   same width as the tab and grows out of it; the tab stays put and closes it. */
:root {
  --sheet-w: 520px;
}
.tf-dock {
  position: relative;
  z-index: 32;
  flex-shrink: 0;
  height: calc(var(--tf-bar) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  display: flex;
  justify-content: center;
  background: var(--bg);
}
.tf-tab {
  width: min(var(--sheet-w), 100%);
  height: var(--tf-bar);
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid #222;
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
  background: #0f0f0f;
  color: var(--label);
  font-size: 12px;
  line-height: 16px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
  min-width: 0;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.tf-tab b {
  color: var(--text);
  font-weight: 400;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tf-by {
  overflow: hidden;
  text-overflow: ellipsis;
}
.tf-tab .vis-dot {
  width: 6px;
  height: 6px;
  border: 0;
}
.vis-dot.private {
  background: var(--amber);
}
.vis-dot.public {
  background: var(--green);
}
.tf-chev {
  flex-shrink: 0;
  color: var(--faint);
  transition: transform 0.3s ease, color 0.2s ease;
}
.tf-tab:hover {
  background: #151515;
}
.tf-tab:hover .tf-chev {
  color: var(--text);
}
.tf-tab:focus-visible {
  outline: 1px solid #3a3a3a;
  outline-offset: -2px;
}
/* open: the tab becomes the foot of the sheet */
body.sheet-open .tf-tab {
  background: var(--bg);
  border-color: #2a2a2a;
  border-top-color: var(--bg);
  border-radius: 0;
}
body.sheet-open .tf-chev {
  transform: rotate(180deg);
}

.sheet-veil {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: #000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
body.sheet-open .sheet-veil {
  opacity: 0.35;
  pointer-events: auto;
}
body.sheet-open.sheet-full .sheet-veil {
  opacity: 0.55;
}
/* The bottom sheet opens about halfway, so the tool stays in view above it.
   Scrolling the details, or dragging the sheet up, gives it the full height. */
.sheet {
  --sheet-full: calc(100dvh - var(--tf-bar) - env(safe-area-inset-bottom) - var(--tf-top) - 24px);
  position: fixed;
  z-index: 31;
  left: 50%;
  bottom: calc(var(--tf-bar) + env(safe-area-inset-bottom));
  width: min(var(--sheet-w), 100vw);
  max-height: min(50dvh, var(--sheet-full));
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border: 1px solid #2a2a2a;
  border-bottom: 0;
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.5);
  transform: translate(-50%, calc(100% + var(--tf-bar) + 40px));
  transition:
    transform 0.42s cubic-bezier(0.2, 0.8, 0.2, 1),
    max-height 0.36s cubic-bezier(0.2, 0.8, 0.2, 1);
  outline: none;
}
body.sheet-full .sheet {
  max-height: var(--sheet-full);
}
body.sheet-open .sheet {
  transform: translate(-50%, var(--drag, 0px));
}
.sheet.dragging {
  transition: none;
}
.sheet-grab {
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  padding: 8px 0 2px;
}
.sheet-grab span {
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background: #3a3a3a;
}
@media (pointer: fine) {
  .sheet-grab span {
    visibility: hidden;
  }
}
.sheet-scroll {
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #2a2a2a transparent;
}
@media (max-width: 600px) {
  .tf-tab {
    border-left: 0;
    border-right: 0;
    border-radius: 0;
  }
  .tf-by {
    display: none;
  }
  .sheet {
    border-left: 0;
    border-right: 0;
    border-radius: 20px 20px 0 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .sheet,
  .tf .sheet,
  .sheet-veil,
  .tf-chev {
    transition: none;
  }
}

.sh-head {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 14px 22px 0;
}
.sh-names {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sh-title-group {
  display: flex;
  flex-direction: column;
}
.sh-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.sh-head h1 {
  margin: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 24px;
  line-height: 30px;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: #fff;
}
.sh-handle {
  align-self: flex-start;
  font-size: 12px;
  line-height: 16px;
  color: var(--label);
  text-decoration: underline 1px;
  text-underline-offset: 3px;
}
.sh-handle:hover {
  color: var(--text);
}
.sh-signals {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  padding-top: 2px;
  color: var(--label);
  font-size: 12px;
  line-height: 16px;
}
.sh-signals b {
  color: var(--text);
  font-weight: 400;
}

.icon-btn {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--label);
  cursor: pointer;
}
.icon-btn:hover,
.icon-btn[aria-expanded='true'] {
  background: #1e1e1e;
  color: var(--text);
}
.sh-more {
  position: relative;
  margin: -1px -8px 0 0;
}
.menu {
  position: absolute;
  right: 0;
  top: 36px;
  z-index: 2;
  min-width: 190px;
  display: flex;
  flex-direction: column;
  padding: 4px;
  background: #171717;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}
.menu button,
.menu a {
  display: block;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--text);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.menu button:hover,
.menu a:hover,
.menu button:focus-visible,
.menu a:focus-visible {
  background: #232323;
  outline: none;
}
.menu hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 4px 6px;
}

.sheet .owner-note {
  margin: 0;
}
.sh-actions {
  display: flex;
  gap: 8px;
}
.sh-actions > .btn,
.sh-actions > form {
  flex: 1;
  min-width: 0;
}
.sh-actions form .btn {
  width: 100%;
}
.btn .n:empty {
  display: none;
}
.btn .n {
  color: var(--faint);
}
.btn.on {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}
.btn.on .n {
  color: #6a6a6a;
}

.sh-gallery {
  padding-top: 24px;
}
.sh-carousel {
  position: relative;
}
/* Arrows for mouse users: they show when you hover the row. Touch screens swipe. */
.sh-nav {
  position: absolute;
  top: calc(50% - 16px);
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid #333;
  border-radius: 50%;
  background: rgba(10, 10, 10, 0.8);
  color: var(--text);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease, background 0.15s ease;
}
.sh-nav.prev {
  left: 30px;
}
.sh-nav.next {
  right: 12px;
}
.sh-carousel:hover .sh-nav,
.sh-nav:focus-visible {
  opacity: 1;
}
.sh-nav:hover {
  background: #1a1a1a;
}
@media (hover: none) {
  .sh-nav {
    display: none;
  }
}
.sh-track {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 22px;
  padding: 0 22px;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.sh-track::-webkit-scrollbar {
  display: none;
}
.sh-media {
  margin: 0;
  flex: 0 0 84%;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sh-media:only-child {
  flex-basis: 100%;
}
.sh-media .frame {
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  overflow: hidden;
  background: var(--raised);
  outline: 1px solid rgba(255, 255, 255, 0.09);
  outline-offset: -1px;
}
.sh-media img,
.sh-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.sh-media video {
  cursor: pointer;
}
.sh-media figcaption {
  color: var(--label);
  font-size: 12px;
  line-height: 16px;
}

.sh-about {
  padding: 20px 22px 32px;
}
.sh-head + .sh-details,
.sh-gallery + .sh-details {
  margin-top: 32px;
}
.sh-details {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px 22px;
  border-top: 1px solid var(--line);
  font-size: 12px;
}
.sh-row {
  display: flex;
  gap: 12px;
}
.sh-row .k {
  width: 92px;
  flex-shrink: 0;
  white-space: nowrap;
  color: var(--faint);
}
.sh-row .v {
  min-width: 0;
  color: var(--text);
}
.sh-row .dim {
  color: var(--label);
}
.sh-row a {
  color: var(--text);
  text-decoration: underline 1px #444;
  text-underline-offset: 3px;
}

/* Twist's own corner of the sheet: who made the place, and an invitation. */
.sh-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 22px;
  background: #0d0d0d;
  border-top: 1px solid #1e1e1e;
  border-bottom: 1px solid #1e1e1e;
}
.sh-brand-name {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}
.sh-brand-name svg {
  flex-shrink: 0;
}
.sh-brand-name > span {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  font-size: 12px;
  line-height: 16px;
  color: var(--label);
}
.sh-brand-name b {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}
.sh-brand .btn.small {
  padding: 7px 12px;
  flex-shrink: 0;
}
.pointer-coarse {
  display: none;
}
@media (pointer: coarse) {
  .pointer-fine {
    display: none;
  }
  .pointer-coarse {
    display: inline;
  }
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 12px);
  background: var(--text);
  color: var(--bg);
  padding: 8px 14px;
  border-radius: 8px;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
  z-index: 50;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

dialog {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  width: min(420px, calc(100vw - 32px));
}
dialog::backdrop {
  background: #000000aa;
}
dialog h2 {
  font-size: 14px;
  font-weight: 500;
  margin: 0 0 14px;
}
dialog form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
dialog .row {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
/* Edit profile: leaving with a field changed and not saved. */
.leave-text {
  margin: 0 0 18px;
  color: var(--label);
  line-height: 20px;
}
.leave-error {
  margin: -8px 0 18px;
  font-size: 12px;
  line-height: 18px;
  color: var(--amber);
}
@media (max-width: 480px) {
  #unsaved .row {
    flex-direction: column-reverse;
  }
}

/* ---------- profile ---------- */

.profile-layout {
  display: flex;
  gap: 24px;
  padding: 8px 20px 80px;
  align-items: flex-start;
}
.person {
  width: var(--col);
  flex-shrink: 0;
  position: sticky;
  top: calc(var(--head) + 8px);
}
.person .head {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 22px;
}
.person .head .title {
  padding-top: 6px;
}
.person .share {
  display: flex;
  gap: 8px;
  padding: 20px 0 28px;
}
.works {
  flex: 1;
  min-width: 0;
}
.works-head {
  display: flex;
  justify-content: space-between;
  padding: 4px 0 16px;
  color: var(--label);
}
.works-head b {
  color: var(--text);
  font-weight: 400;
  margin-left: 8px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 28px 22px;
}
.card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-decoration: none;
}
.cover {
  aspect-ratio: 16 / 10;
  border-radius: 6px;
  overflow: hidden;
  background: var(--raised);
  border: 1px solid #1a1a1a;
  position: relative;
}
.cover img,
.cover video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.cover .placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--faint);
  font-size: 22px;
  letter-spacing: 0.02em;
  background: radial-gradient(circle, #1e1e22 1px, transparent 1.2px) 0 0 / 10px 10px, var(--raised);
}
.card:hover .cover {
  border-color: #333;
}
.card .line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.card .line b {
  font-weight: 500;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.card .line span {
  color: var(--label);
  white-space: nowrap;
}
.card .sub {
  color: var(--label);
  font-size: 12px;
  line-height: 18px;
  margin-top: -4px;
}
.empty {
  color: var(--label);
  line-height: 21px;
  padding: 40px 0;
}

/* ---------- plain pages: home, sign in, studio ---------- */

.page {
  max-width: 1100px;
  padding: 32px 20px 96px;
  margin: 0 auto;
}
.page.narrow {
  max-width: 460px;
}
.page h1 {
  font-size: 28px;
  line-height: 34px;
  font-weight: 500;
  letter-spacing: 0.02em;
  margin: 0 0 10px;
}
.page h2 {
  font-size: 13px;
  font-weight: 500;
  margin: 0 0 12px;
}
.lede {
  color: var(--muted);
  font-size: 14px;
  line-height: 22px;
  margin: 0 0 28px;
}
.muted {
  color: var(--label);
}
.faint {
  color: var(--faint);
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 28px 0;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.field label {
  color: var(--label);
  font-size: 12px;
}
.field .hint {
  color: var(--faint);
  font-size: 12px;
  line-height: 18px;
}
.input,
textarea.input,
select.input {
  width: 100%;
  background: var(--stage);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text);
  line-height: 18px;
}
textarea.input {
  min-height: 180px;
  resize: vertical;
  line-height: 20px;
}
.input:focus {
  outline: none;
  border-color: #5a5a5a;
}
.form-error {
  color: var(--danger);
  line-height: 20px;
}
.form-ok {
  color: var(--text-2);
  line-height: 20px;
}

.code {
  background: var(--stage);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  line-height: 20px;
  color: var(--text-2);
  overflow-x: auto;
  white-space: pre;
  position: relative;
}
.copy-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.copy-row .code {
  flex: 1;
}

.home {
  max-width: 880px;
  padding: 12vh 20px 120px;
  margin: 0 auto;
}
.home h1 {
  font-size: 44px;
  line-height: 50px;
  font-weight: 500;
  letter-spacing: 0.01em;
  margin: 0 0 18px;
}
.home .lede {
  font-size: 15px;
  line-height: 24px;
  max-width: 680px;
}
.steps {
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin-top: 44px;
}
.step {
  display: flex;
  gap: 16px;
}
.step .n {
  color: var(--faint);
  width: 16px;
  flex-shrink: 0;
  line-height: 20px;
}
.step .body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  line-height: 20px;
  color: var(--text-2);
}

/* studio */
.studio-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 24px;
}
.rows {
  border-top: 1px solid var(--line);
}
.trow {
  display: grid;
  grid-template-columns: 96px 1fr 90px 90px 120px;
  gap: 16px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}
.trow:hover {
  background: #0f0f0f;
}
.trow .thumb {
  aspect-ratio: 16 / 10;
  border-radius: 4px;
  overflow: hidden;
  background: var(--raised);
  position: relative;
}
.trow .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.trow .thumb .placeholder {
  font-size: 12px;
}
.trow .nm b {
  display: block;
  font-weight: 500;
  margin-bottom: 4px;
}
.trow .nm span {
  color: var(--label);
  font-size: 12px;
}
.trow .c {
  color: var(--label);
  font-size: 12px;
}

.drop {
  display: block;
  border: 1px dashed #3a3a3a;
  border-radius: 10px;
  padding: 28px 20px;
  text-align: center;
  color: var(--label);
  line-height: 20px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.drop b {
  color: var(--text);
  font-weight: 400;
  display: block;
  margin-bottom: 6px;
}
.drop .drop-line {
  display: block;
}
.drop u {
  text-decoration: underline 1px var(--underline);
  text-underline-offset: 3px;
  color: var(--text-2);
}
.drop.over {
  border-color: var(--text);
  background: #111;
}
.drop.busy {
  opacity: 0.6;
  pointer-events: none;
}
.drop input {
  display: none;
}
.result {
  margin-top: 12px;
  line-height: 20px;
  white-space: pre-wrap;
}

/* The editor mirrors the tool page: settings on the left, the live tool on the right. */
.editor {
  display: flex;
  gap: 24px;
  padding: 8px 20px 96px;
  align-items: flex-start;
}
.editor-col {
  width: var(--col);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.editor .preview {
  flex: 1;
  min-width: 0;
  position: sticky;
  top: calc(var(--head) + 8px);
  height: calc(100vh - var(--head) - 64px);
}
.editor .preview .stage {
  height: 100%;
}
.ed-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 4px 0 24px;
}
.ed-link {
  color: var(--label);
  font-size: 12px;
  text-decoration: none;
  width: fit-content;
}
.ed-link:hover {
  color: var(--text);
}
.ed-section {
  padding: 22px 0;
  border-top: 1px solid var(--line);
}
.ed-section .signals {
  border: 0;
  padding: 0;
}
.section-label em,
.field > span em {
  font-style: normal;
  color: var(--faint);
  margin-left: 8px;
}
.hint {
  color: var(--faint);
  font-size: 12px;
  line-height: 18px;
  margin: 10px 0 0;
}
.seg {
  display: flex;
  gap: 2px;
  padding: 3px;
  background: var(--stage);
  border: 1px solid var(--border);
  border-radius: 9px;
}
.seg button {
  flex: 1;
  border: 0;
  border-radius: 6px;
  padding: 8px 0;
  background: transparent;
  color: var(--label);
  cursor: pointer;
}
.seg button:hover:not(.on):not([disabled]) {
  color: var(--text);
}
.seg button.on {
  background: var(--chip);
  color: var(--text);
  cursor: default;
}
.seg button[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
}
.ed-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.field > span {
  color: var(--label);
  font-size: 12px;
}
.linkish {
  border: 0;
  background: none;
  padding: 0;
  color: var(--label);
  font-size: 12px;
  cursor: pointer;
  text-decoration: underline 1px var(--underline);
  text-underline-offset: 3px;
}
.linkish:hover {
  color: var(--text);
}
.versions .vrow:last-child {
  border-bottom: 0;
}
.vrow .r {
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--label);
  white-space: nowrap;
}
.vrow .r .live {
  color: var(--text);
}
.vrow .r form {
  display: inline;
}
.gal-item {
  grid-template-columns: 80px 1fr auto;
}
.gal-caption {
  display: flex;
  gap: 8px;
  align-items: center;
}
.gal-caption .input {
  padding: 7px 10px;
  font-size: 12px;
}
.gal-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}
.ed-section.quiet {
  padding-top: 18px;
}
.checks {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  line-height: 18px;
}
.checks .ck {
  display: flex;
  gap: 10px;
}
.checks .ck i {
  font-style: normal;
  width: 14px;
  flex-shrink: 0;
  color: var(--label);
}
.checks .ck.warn i,
.checks .ck.review i {
  color: #f0b65a;
}
.checks .ck span {
  color: var(--text-2);
}
.vrow {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  line-height: 18px;
}
.vrow .l b {
  font-weight: 500;
  margin-right: 8px;
}
.vrow .l span {
  color: var(--label);
}
.gal-edit {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.gal-item {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: 12px;
  align-items: center;
}
.gal-item .thumb {
  aspect-ratio: 16 / 10;
  border-radius: 4px;
  overflow: hidden;
  background: var(--raised);
}
.gal-item .thumb img,
.gal-item .thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.gal-item form {
  display: flex;
  gap: 6px;
}
.cover-edit {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 14px;
  align-items: center;
}
.inline-form {
  display: inline;
}
.tokens .tok {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.banner {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  line-height: 20px;
  color: var(--text-2);
  margin-bottom: 20px;
}
.banner.warn {
  border-color: #4a3a1c;
  color: #f0d5a8;
}

/* ---------- small screens ---------- */

@media (max-width: 900px) {
  .bar {
    padding: 0 16px;
  }
  .crumbs .here {
    max-width: 40vw;
  }
  .nav {
    gap: 10px;
  }
  .profile-layout {
    flex-direction: column;
    padding: 4px 16px 60px;
  }
  .person {
    width: 100%;
    position: static;
  }
  .works {
    width: 100%;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .page {
    padding: 20px 16px 80px;
  }
  .home {
    padding: 8vh 16px 80px;
  }
  .home h1 {
    font-size: 32px;
    line-height: 38px;
  }
  .trow {
    grid-template-columns: 72px 1fr 70px;
  }
  .trow .c.hide-sm {
    display: none;
  }
  .editor {
    flex-direction: column;
    padding: 4px 16px 60px;
  }
  .editor-col {
    width: 100%;
  }
  .editor .preview {
    position: static;
    width: 100%;
    height: 60vh;
  }
  .studio-head {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* file inputs in the studio */
input[type='file'] {
  color: var(--label);
  font-size: 12px;
  max-width: 100%;
}
input[type='file']::file-selector-button {
  font: inherit;
  font-size: 12px;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 12px;
  margin-right: 10px;
  cursor: pointer;
}
input[type='file']::file-selector-button:hover {
  border-color: #4a4a4a;
}

/* sign in */
.or {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--faint);
  font-size: 12px;
  margin: 4px 0;
}
.or::before,
.or::after {
  content: '';
  flex: 1;
  border-top: 1px solid var(--line);
}
.code-input {
  font-size: 22px;
  line-height: 30px;
  letter-spacing: 0.3em;
  text-align: center;
}

/* ---------- editing: a focused screen ---------- */

.ed-bar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 56px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #0a0a0aeb;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.ed-bar-l,
.ed-bar-r {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}
.ed-title {
  color: var(--text);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.ed-cancel {
  color: var(--label);
  text-decoration: none;
  white-space: nowrap;
}
.ed-cancel:hover {
  color: var(--text);
}
.ed-status {
  color: var(--label);
  font-size: 12px;
  white-space: nowrap;
  transition: opacity 0.3s;
}
.ed-status.dirty {
  color: #f0b65a;
}
.ed-save {
  padding: 9px 18px;
  font-size: 13px;
}
.ed-save[disabled] {
  opacity: 1;
  background: transparent;
  border-color: var(--border);
  color: var(--faint);
  pointer-events: none;
}
.ed-focus {
  max-width: 640px;
  margin: 0 auto;
  padding: 28px 20px 120px;
}
.ed-focus .ed-section {
  padding: 28px 0;
}
.ed-focus .ed-section.first {
  border-top: 0;
  padding-top: 8px;
}
.ed-fields {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.choice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.choice-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 14px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.choice-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.choice-card b {
  font-weight: 500;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}
.choice-card b::before {
  content: '';
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid #5a5a5a;
  flex-shrink: 0;
}
.choice-card span {
  color: var(--muted);
  font-size: 12px;
  line-height: 18px;
}
.choice-card:hover {
  border-color: #4a4a4a;
}
.choice-card:has(input:checked) {
  border-color: var(--text);
  background: #111;
}
.choice-card:has(input:checked) b::before {
  border-color: var(--text);
  background: radial-gradient(circle, var(--text) 3px, transparent 3.5px);
}
.choice-card:has(input:focus-visible) {
  outline: 1px solid var(--text);
  outline-offset: 2px;
}
.choice-card.off {
  cursor: not-allowed;
  opacity: 0.55;
}
.choice-card.off:hover {
  border-color: var(--border);
}
@media (max-width: 600px) {
  .choice {
    grid-template-columns: 1fr;
  }
}

.ed-titles {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.ed-titles .ed-fields {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.input.title-input {
  font-size: 24px;
  line-height: 32px;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 12px 14px;
}

/* No dividers in the editor: sections are separated by space. */
.ed-focus .ed-section {
  border-top: 0;
  padding: 22px 0 26px;
}
.ed-focus .ed-section .section-label {
  margin-bottom: 14px;
}
.ed-bar {
  border-bottom-color: transparent;
  transition: border-color 0.2s;
}
.ed-bar.scrolled {
  border-bottom-color: var(--line);
}
.ed-focus .vrow {
  border-bottom: 0;
  padding: 6px 0;
}

/* cover, gallery and versions in the editor */
.media-drop input[type='file'] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.cover-pick {
  display: block;
  position: relative;
  cursor: pointer;
  border-radius: 10px;
  overflow: hidden;
}
.cover-pick .cover {
  border-radius: 10px;
}
.pick-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: #0a0a0ab3;
  color: var(--text);
  font-size: 13px;
  opacity: 0;
  transition: opacity 0.15s;
}
.cover-pick:hover .pick-overlay,
.media-drop.over .pick-overlay,
.media-drop.busy .pick-overlay {
  opacity: 1;
}
.pick-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-top: 10px;
  font-size: 12px;
  line-height: 18px;
  color: var(--faint);
}
.gal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 12px;
}
.gal-tile {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.gal-media {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 8px;
  overflow: hidden;
  background: var(--raised);
}
.gal-media img,
.gal-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.gal-tools {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.15s;
}
.gal-tile:hover .gal-tools,
.gal-tile:focus-within .gal-tools {
  opacity: 1;
}
.gal-tools button {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: #0a0a0acc;
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
}
.gal-tools button:hover {
  border-color: #5a5a5a;
}
.gal-cap input {
  width: 100%;
  background: none;
  border: 0;
  border-bottom: 1px solid transparent;
  padding: 2px 0 4px;
  color: var(--text-2);
  font-size: 12px;
  line-height: 16px;
  outline: none;
}
.gal-cap input::placeholder {
  color: var(--faint);
}
.gal-cap input:hover {
  border-bottom-color: var(--line);
}
.gal-cap input:focus {
  border-bottom-color: #5a5a5a;
}
.gal-add label {
  aspect-ratio: 16 / 10;
  border: 1px dashed #3a3a3a;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--text-2);
  font-size: 12px;
  cursor: pointer;
  text-align: center;
  padding: 12px;
  transition: border-color 0.15s, background 0.15s;
}
.gal-add label:hover,
.gal-add.over label {
  border-color: var(--text);
  background: #111;
}
.media-drop.busy {
  opacity: 0.6;
  pointer-events: none;
}
.ed-focus .vrow {
  align-items: center;
}
.ed-focus .vrow .r .pill {
  font-size: 11px;
}
@media (max-width: 600px) {
  .gal-grid {
    grid-template-columns: 1fr;
  }
}
.gal-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #0a0a0acc;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 11px;
  line-height: 14px;
  letter-spacing: 0.02em;
}
.gal-note {
  color: var(--faint);
  font-size: 12px;
  line-height: 16px;
  padding-top: 2px;
}
.gal-tools button.wide {
  width: auto;
  padding: 0 10px;
  font-size: 11px;
}

/* editor bar: cancel left, title centred, save right */
.ed-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
}
.ed-bar .ed-cancel {
  justify-self: start;
}
.ed-bar .ed-title {
  justify-self: center;
}
.ed-bar .ed-bar-r {
  justify-self: end;
}

/* Owner-only status at the top of the tool page */
.owner-note {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  margin-bottom: 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 12px;
  line-height: 16px;
  color: var(--muted);
}
.owner-note > span:not(.vis-dot) {
  flex: 1;
  min-width: 0;
}
.owner-note b {
  color: var(--text);
  font-weight: 500;
  margin-right: 8px;
}
.owner-note a {
  color: var(--label);
  text-decoration: underline 1px var(--underline);
  text-underline-offset: 3px;
  white-space: nowrap;
}
.owner-note a:hover {
  color: var(--text);
}
.vis-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1px solid var(--text);
}
.owner-note.public .vis-dot {
  background: var(--text);
}

/* A little color, only for status: amber means only you, green means out in the world. */
:root {
  --amber: #f2b45a;
  --amber-line: #5a4320;
  --amber-wash: #f2b45a0f;
  --green: #5bd18b;
  --green-line: #1f4a33;
  --green-wash: #5bd18b0f;
}
.owner-note.private {
  border-color: var(--amber-line);
  background: var(--amber-wash);
}
.owner-note.private .vis-dot {
  border-color: var(--amber);
  background: var(--amber);
}
.owner-note.private b {
  color: var(--amber);
}
.owner-note.public {
  border-color: var(--green-line);
  background: var(--green-wash);
}
.owner-note.public .vis-dot {
  border-color: var(--green);
  background: var(--green);
  box-shadow: 0 0 0 3px #5bd18b26;
}
.owner-note.public b {
  color: var(--green);
}

/* editor visibility cards */
.choice-card.is-private:has(input:checked) {
  border-color: var(--amber);
  background: var(--amber-wash);
}
.choice-card.is-private:has(input:checked) b {
  color: var(--amber);
}
.choice-card.is-private:has(input:checked) b::before {
  border-color: var(--amber);
  background: radial-gradient(circle, var(--amber) 3px, transparent 3.5px);
}
.choice-card.is-public:has(input:checked) {
  border-color: var(--green);
  background: var(--green-wash);
}
.choice-card.is-public:has(input:checked) b {
  color: var(--green);
}
.choice-card.is-public:has(input:checked) b::before {
  border-color: var(--green);
  background: radial-gradient(circle, var(--green) 3px, transparent 3.5px);
}

/* versions and review */
.pill.live {
  color: var(--green);
  border-color: var(--green-line);
  background: var(--green-wash);
}
.pill.warn {
  color: var(--amber);
  border-color: var(--amber-line);
  background: var(--amber-wash);
}
.ed-status.dirty {
  color: var(--amber);
}
.owner-note > span:not(.vis-dot) {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* connect instructions */
.connect {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.connect details {
  border-top: 1px solid var(--line);
  padding: 0 14px;
}
.connect details:first-child {
  border-top: 0;
}
.connect summary {
  cursor: pointer;
  padding: 12px 0;
  color: var(--text-2);
  list-style: none;
  display: flex;
  justify-content: space-between;
}
.connect summary::-webkit-details-marker {
  display: none;
}
.connect summary::after {
  content: '+';
  color: var(--faint);
}
.connect details[open] summary::after {
  content: '−';
}
.connect details[open] {
  padding-bottom: 14px;
}
.connect details .hint {
  margin: 0 0 8px;
}
.connect details .copy-row + .hint {
  margin: 8px 0 0;
}

[hidden] {
  display: none !important;
}
label.gal-add {
  position: relative;
  aspect-ratio: 16 / 10;
  border: 1px dashed #3a3a3a;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--text-2);
  font-size: 12px;
  cursor: pointer;
  text-align: center;
  padding: 12px;
  transition: border-color 0.15s, background 0.15s;
}
label.gal-add:hover,
label.gal-add.over {
  border-color: var(--text);
  background: #111;
}
label.gal-add input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.gal-tile .gal-badge {
  display: none;
}
.gal-tile.first .gal-badge,
.gal-tile[data-placeholder] .gal-badge {
  display: block;
}
.gal-tile.first [data-act='cover'],
.gal-tile.first [data-act='earlier'],
.gal-tile.second [data-act='earlier'] {
  display: none;
}
.gal-tile.uploading .gal-media::after {
  content: 'uploading…';
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: #0a0a0ab3;
  color: var(--text-2);
  font-size: 12px;
}
.gal-tile.failed .gal-media::after {
  content: "couldn't upload";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: #2a0d0eb3;
  color: #ffb4b4;
  font-size: 12px;
}

/* studio list: the row opens the tool, edit is its own link */
.trow {
  text-decoration: none;
}
.trow .nm {
  text-decoration: none;
  min-width: 0;
}
.trow .nm:hover b {
  text-decoration: underline 1px var(--underline);
  text-underline-offset: 3px;
}
.trow .thumb {
  display: block;
}
.trow .vis-private {
  color: var(--amber);
}
.trow .vis-public {
  color: var(--green);
}
.trow .row-edit {
  justify-self: end;
  color: var(--label);
  text-decoration: underline 1px var(--underline);
  text-underline-offset: 3px;
}
.trow .row-edit:hover {
  color: var(--text);
}
@media (max-width: 900px) {
  .trow {
    grid-template-columns: 72px 1fr auto auto;
  }
}

/* toasts sit above the tool page's tab and stay on one line */
.toast {
  white-space: nowrap;
  max-width: calc(100vw - 32px);
  overflow: hidden;
  text-overflow: ellipsis;
}
body.tool-page .toast {
  bottom: calc(var(--tf-bar) + env(safe-area-inset-bottom) + 14px);
}
@media (min-width: 1024px) {
  body.tool-page .toast {
    bottom: 24px;
  }
}

/* top bar: publish, then the account menu under the avatar */
.publish-btn {
  color: var(--text);
}
.nav .btn.small {
  padding: 5px 10px;
}
.acct {
  position: relative;
  display: flex;
}
.acct-btn {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin: -6px -6px -6px 0;
  border: 0;
  border-radius: 50%;
  background: none;
  cursor: pointer;
}
.acct-btn .avatar {
  width: 24px;
  height: 24px;
  font-size: 11px;
}
.acct-btn:hover .avatar,
.acct-btn[aria-expanded='true'] .avatar {
  box-shadow: 0 0 0 2px #333;
}
.acct .menu {
  top: 34px;
  right: -6px;
  z-index: 40;
}
.menu-who {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px 10px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 4px;
  font-size: 12px;
  color: var(--label);
}
.menu-who b {
  color: var(--text);
  font-weight: 500;
}
/* the name block is the link to your profile */
.menu a.menu-who {
  display: flex;
  border-radius: 6px 6px 0 0;
}
.menu a.menu-who:hover span {
  color: var(--text-2);
}
.menu form {
  margin: 0;
}

/* publish page: one big place to drop a tool, and a line for agents */
.page.pub {
  max-width: 820px;
}
.drop.big {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 280px;
  padding: 48px 24px;
  border-radius: 14px;
}
.drop.big b {
  font-size: 16px;
  line-height: 22px;
  margin-bottom: 4px;
}
.drop-needs {
  display: block;
  margin-top: 22px;
  font-size: 12px;
  line-height: 18px;
  color: var(--faint);
}
.drop-needs a {
  color: var(--label);
  text-decoration: underline 1px var(--underline);
  text-underline-offset: 3px;
}
.pub-agent {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.pub-agent-label {
  color: var(--text);
}
.pub-agent-text {
  flex: 1;
  min-width: 200px;
  color: var(--label);
}
.pub-link {
  color: var(--label);
  font-size: 12px;
  text-decoration: underline 1px var(--underline);
  text-underline-offset: 3px;
}
.pub-link:hover {
  color: var(--text);
}
.connect-dialog {
  width: min(600px, calc(100vw - 32px));
}
.connect-dialog .muted {
  margin: 0 0 12px;
  line-height: 20px;
}
.connect-dialog .muted.then {
  margin: 16px 0 10px;
}
.connect-dialog form.row {
  margin-top: 16px;
  align-items: flex-end;
}

/* a small disclosure link, like "connect an agent" on connections */
.pub-more > summary {
  cursor: pointer;
  color: var(--label);
  font-size: 12px;
  list-style: none;
  text-decoration: underline 1px var(--underline);
  text-underline-offset: 3px;
  width: fit-content;
}
.pub-more > summary::-webkit-details-marker {
  display: none;
}
.pub-more > summary:hover {
  color: var(--text);
}
.pub-more[open] > summary {
  margin-bottom: 12px;
}

/* requirements */
.docs h2 {
  margin: 28px 0 10px;
  font-size: 14px;
}
.docs ul {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  line-height: 20px;
  color: var(--text-2);
}
.docs p {
  color: var(--text-2);
  line-height: 20px;
  margin: 0 0 10px;
}
.docs a {
  text-decoration: underline 1px var(--underline);
  text-underline-offset: 3px;
}
.docs .btn {
  text-decoration: none;
}
.em {
  color: var(--text-2);
}
.mcp-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 16px;
  border: 1px solid;
}
.mcp-status .vis-dot {
  width: 7px;
  height: 7px;
  border: 0;
}
.mcp-status.on {
  color: var(--green);
  border-color: var(--green-line);
  background: var(--green-wash);
}
.mcp-status.on .vis-dot {
  background: var(--green);
}
.mcp-status.off {
  color: var(--amber);
  border-color: var(--amber-line);
  background: var(--amber-wash);
}
.mcp-status.off .vis-dot {
  background: var(--amber);
}
.agents {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.agent {
  display: flex;
  gap: 10px;
  align-items: baseline;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 12px;
  color: var(--label);
}
.agent b {
  color: var(--text);
  font-weight: 400;
}

/* the creator's own cards: status in color, and an edit link */
.card-wrap {
  position: relative;
}
.card .line .vis-private {
  color: var(--amber);
}
.card-edit {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 10px;
  border-radius: 6px;
  border: 1px solid #333;
  background: rgba(10, 10, 10, 0.85);
  color: var(--text);
  font-size: 12px;
  line-height: 16px;
  text-decoration: none;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.card-wrap:hover .card-edit,
.card-edit:focus-visible {
  opacity: 1;
}
@media (hover: none) {
  .card-edit {
    opacity: 1;
  }
}
.saved-head {
  margin-top: 40px;
}

/* editor: limits under media, and a delete section you can find */
.media-limits {
  margin-top: 12px;
}
.ed-danger .danger-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid #3a1c1d;
  border-radius: 10px;
}
.ed-danger p {
  margin: 0;
  color: var(--label);
  font-size: 12px;
  line-height: 18px;
}
/* A line of text with one action: download in the editor and in settings. */
.row-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.row-box p {
  margin: 0;
  color: var(--label);
  font-size: 12px;
  line-height: 18px;
}
.row-box .btn {
  flex-shrink: 0;
}
.data-block {
  margin-top: 40px;
}
@media (max-width: 600px) {
  .row-box {
    flex-direction: column;
    align-items: stretch;
  }
}
@media (max-width: 600px) {
  .ed-danger .danger-row {
    flex-direction: column;
    align-items: stretch;
  }
}

/* editor: an on/off switch row, for allow remixes */
.switch-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}
.switch-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.switch {
  flex-shrink: 0;
  position: relative;
  width: 30px;
  height: 18px;
  margin-top: 1px;
  border-radius: 9px;
  background: #2a2a2a;
  transition: background 0.15s ease;
}
.switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--label);
  transition: transform 0.15s ease, background 0.15s ease;
}
.switch-row input:checked + .switch {
  background: var(--text);
}
.switch-row input:checked + .switch::after {
  transform: translateX(12px);
  background: var(--bg);
}
.switch-row input:focus-visible + .switch {
  outline: 1px solid var(--text);
  outline-offset: 2px;
}
.switch-row > span:not(.switch) {
  display: flex;
  flex-direction: column;
  gap: 4px;
  line-height: 18px;
}
.switch-row b {
  font-weight: 500;
  color: var(--text);
}
.switch-row em {
  font-style: normal;
  font-size: 12px;
  color: var(--label);
}

/* connections */
.conn-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.conn-head h1 {
  margin-bottom: 0;
}
.page.conn .lede {
  margin-top: 10px;
}
.page.conn h2 {
  margin: 32px 0 12px;
  font-size: 14px;
}
.conn-empty,
.conn-note {
  margin: 0 0 12px;
  line-height: 20px;
}
.conn-add {
  margin-top: 14px;
}
.pub-link {
  color: var(--label);
  font-size: 12px;
  text-decoration: underline 1px var(--underline);
  text-underline-offset: 3px;
  width: fit-content;
}
.pub-link:hover {
  color: var(--text);
}

/* handle field: the live check under it */
.handle-status {
  font-size: 12px;
  line-height: 18px;
  color: var(--label);
  min-height: 18px;
}
.handle-status[data-state='ok'] {
  color: var(--green);
}
.handle-status[data-state='bad'] {
  color: var(--amber);
}
.handle-status[data-state='checking'] {
  color: var(--faint);
}

/* connect picker: pick your agent, get three steps */
.cp {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.cp-tiles {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}
.cp-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 16px 6px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--label);
  font-size: 12px;
  line-height: 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.cp-tile input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.cp-logo {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}
.cp-tile:hover {
  border-color: #333;
  color: var(--text);
}
.cp-tile:has(input:checked) {
  border-color: var(--text);
  background: #111;
  color: var(--text);
}
.cp-tile:has(input:focus-visible) {
  outline: 1px solid var(--text);
  outline-offset: 2px;
}
.cp-steps {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.cp-panel {
  display: none;
  flex-direction: column;
  gap: 16px;
}
.cp:has(input[value='claude']:checked) .cp-panel[data-for='claude'],
.cp:has(input[value='chatgpt']:checked) .cp-panel[data-for='chatgpt'],
.cp:has(input[value='cursor']:checked) .cp-panel[data-for='cursor'],
.cp:has(input[value='vscode']:checked) .cp-panel[data-for='vscode'],
.cp:has(input[value='claude-code']:checked) .cp-panel[data-for='claude-code'],
.cp:has(input[value='any']:checked) .cp-panel[data-for='any'] {
  display: flex;
  animation: cp-in 0.25s ease;
}
@keyframes cp-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .cp-panel {
    animation: none !important;
  }
}
.cp-steps li {
  display: flex;
  gap: 12px;
  line-height: 20px;
  color: var(--text-2);
}
.cp-n {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  font-size: 11px;
  line-height: 1;
  color: var(--label);
}
.cp-steps li > div {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cp-steps p {
  margin: 1px 0 0;
}
.cp-install {
  align-self: flex-start;
}
.cp-install .cp-logo {
  width: 16px;
  height: 16px;
}
.cp-note {
  margin: 0;
  padding-left: 34px;
  font-size: 12px;
  line-height: 18px;
  color: var(--label);
}
.cp-note a {
  text-decoration: underline 1px var(--underline);
  text-underline-offset: 3px;
}
.cp-steps a:not(.btn) {
  text-decoration: underline 1px var(--underline);
  text-underline-offset: 3px;
}
@media (max-width: 560px) {
  .cp-tiles {
    grid-template-columns: repeat(3, 1fr);
  }
}
.cp-sub {
  color: var(--label);
  font-size: 12px;
  line-height: 18px;
}
.cp-token {
  display: flex;
  gap: 8px;
}
.cp-token .input {
  flex: 1;
  min-width: 0;
}
.conn-new {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 8px 0 8px;
}
.cp-video {
  margin: 0 0 0 34px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cp-video video {
  width: 100%;
  border-radius: 10px;
  background: #000;
  outline: 1px solid rgba(255, 255, 255, 0.09);
  outline-offset: -1px;
}
.cp-video figcaption {
  font-size: 12px;
  line-height: 16px;
  color: var(--faint);
}

/* Terms and privacy: the agreement line under sign in, and the home footer. */
.agree {
  margin: 22px 0 0;
  font-size: 12px;
  line-height: 18px;
  color: var(--faint);
}
.agree a,
.site-foot a {
  color: var(--label);
  text-decoration: none;
}
.agree a:hover,
.site-foot a:hover {
  color: var(--text);
}
.site-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 88px;
  font-size: 12px;
}

/* The docs index: one row per page, title then a line about it. */
.doc-list {
  list-style: none;
  padding: 0 !important;
  margin: 8px 0 0 !important;
  gap: 4px !important;
}
.doc-list a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  margin: 0 -14px;
  border-radius: 8px;
  text-decoration: none !important;
}
.doc-list a:hover {
  background: #141414;
}
.doc-list b {
  font-weight: 400;
  color: var(--text);
}
.doc-list span {
  color: var(--label);
  font-size: 12px;
  line-height: 18px;
}
.page.doc-wide {
  max-width: 640px;
}

/* An admin looking at a version a check held back: what was flagged, then the decision. */
.review-note {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px 14px;
  margin-bottom: 18px;
  border: 1px solid var(--amber-line);
  background: var(--amber-wash);
  border-radius: 8px;
  font-size: 12px;
  line-height: 18px;
  color: var(--muted);
}
.review-note b {
  display: block;
  margin-bottom: 4px;
  color: var(--amber);
  font-weight: 500;
}
.review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.review-actions form {
  margin: 0;
}
.sh-actions[hidden] {
  display: none;
}
.works-private {
  font-style: normal;
  color: var(--amber);
}

/* The bolt: activity on your tools. Same height as the publish button. */
.act {
  position: relative;
  display: flex;
}
.act-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: none;
  color: var(--muted);
  cursor: pointer;
}
.act-btn:hover,
.act-btn[aria-expanded='true'] {
  color: var(--text);
  border-color: #3a3a3a;
}
.act-dot {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  border: 2px solid var(--bg);
}
.act-menu {
  width: 320px;
  max-width: calc(100vw - 32px);
  padding: 0;
}
.act-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 12px 14px 8px;
  font-size: 12px;
}
.act-head b {
  font-weight: 500;
}
.menu .act-head a {
  display: inline;
  width: auto;
  padding: 0;
  color: var(--label);
}
.menu .act-head a:hover {
  background: none;
  color: var(--text);
}
.act-list {
  display: flex;
  flex-direction: column;
  max-height: 360px;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0 4px 4px;
}
.menu .act-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  line-height: 17px;
  color: var(--muted);
}
.menu .act-item.fresh {
  color: var(--text);
}
.menu .act-item span {
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}
.act-item time {
  flex-shrink: 0;
  color: var(--faint);
}
.act-empty {
  margin: 0;
  padding: 6px 10px 12px;
  font-size: 12px;
  line-height: 18px;
  color: var(--label);
}

/* Email switches on edit profile. */
.email-prefs {
  margin-top: 10px;
}
.email-prefs .switch-row {
  margin-top: 10px;
}
.email-note {
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--faint);
}

/* Edit profile: the picture, with change and remove beside it and the saved
   note on the same line. Dropping an image on the row works too. */
.avatar-edit {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}
.avatar-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}
.avatar-actions .avatar-status {
  margin-left: 4px;
}

/* The picture's preview: drag to place it, zoom with the slider or wheel.
   The ring shows what the round avatar keeps. */
.crop-dialog {
  width: min(340px, calc(100vw - 32px));
}
.crop-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 10px;
  background: var(--stage);
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.crop-stage.dragging {
  cursor: grabbing;
}
.crop-stage canvas {
  display: block;
  width: 100%;
  height: 100%;
}
.crop-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: 0 0 0 999px #000000a6;
  outline: 1px solid #ffffff40;
  pointer-events: none;
}
.crop-zoom {
  width: 100%;
  margin: 16px 0 18px;
  accent-color: var(--text);
}
.avatar-pick {
  flex-shrink: 0;
  padding: 0;
  border: 0;
  background: none;
  border-radius: 50%;
  cursor: pointer;
}
.avatar-pick .avatar.lg {
  width: 64px;
  height: 64px;
  font-size: 24px;
  line-height: 28px;
  transition: opacity 0.15s ease, box-shadow 0.15s ease;
}
.avatar-pick:hover .avatar {
  box-shadow: 0 0 0 1px var(--line), 0 0 0 4px var(--bg), 0 0 0 5px var(--label);
}
.avatar-pick:focus-visible {
  outline: none;
}
.avatar-pick:focus-visible .avatar {
  box-shadow: 0 0 0 4px var(--bg), 0 0 0 5px var(--text);
}
.avatar-edit.over .avatar-pick .avatar {
  box-shadow: 0 0 0 4px var(--bg), 0 0 0 5px var(--text);
}
.avatar-edit.busy .avatar-pick .avatar {
  opacity: 0.5;
}
.avatar-edit.busy .btn {
  opacity: 0.4;
  pointer-events: none;
}
/* Edit profile: each field has its own save; the label row says when it saved. */
.field-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.field-status {
  font-size: 12px;
  line-height: 16px;
  color: var(--label);
  text-align: right;
}
.field-status[data-state='bad'] {
  color: var(--amber);
}
.input-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.input-row .input {
  flex: 1;
  min-width: 0;
}
.avatar-status:empty {
  display: none;
}
.avatar-status {
  font-size: 12px;
  line-height: 18px;
  color: var(--faint);
}
.avatar-status[data-state='ok'] {
  color: var(--label);
}
.avatar-status[data-state='bad'] {
  color: var(--amber);
}

/* Tabs at the top of a page: profile and notifications on edit profile. */
.tabs {
  display: flex;
  gap: 22px;
  margin: 4px 0 22px;
  font-size: 14px;
}
.tabs a {
  padding: 4px 0 6px;
  color: var(--label);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.tabs a:hover {
  color: var(--text);
}
.tabs a.on {
  color: var(--text);
  border-bottom-color: var(--text);
}

/* The full activity list. */
.act-rows {
  display: flex;
  flex-direction: column;
  margin: 8px -12px 0;
}
.act-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  line-height: 18px;
}
.act-row:hover {
  background: #141414;
  color: var(--text);
}
.act-row.fresh {
  color: var(--text);
}
.act-row time {
  flex-shrink: 0;
  color: var(--faint);
}
.activity-page .lede a {
  color: var(--label);
}
.sh-row[title] .k {
  text-decoration: underline dotted 1px #3a3a3a;
  text-underline-offset: 3px;
  cursor: help;
}

/* Home: the process, then the setup folded underneath. */
.process {
  list-style: none;
  margin: 44px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.process li {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px;
  border: 1px solid #1f1f1f;
  border-radius: 12px;
  background: #0d0d0d;
  font-size: 13px;
  line-height: 19px;
  color: var(--label);
}
.process .pn {
  color: var(--faint);
  font-size: 12px;
}
.process b {
  font-weight: 500;
  font-size: 15px;
  color: var(--text);
  margin-bottom: 2px;
}
.process-logos {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}
.process-logos svg {
  width: 15px;
  height: 15px;
}
.process-code {
  margin-top: 2px;
  padding: 6px 9px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  width: fit-content;
}
.process-link {
  margin-top: auto;
  padding: 6px 0 0;
  border: 0;
  background: none;
  font: inherit;
  cursor: pointer;
  width: fit-content;
  color: var(--text-2);
  text-decoration: underline 1px var(--underline);
  text-underline-offset: 3px;
}
.process-link:hover {
  color: var(--text);
}
.home-ideas {
  margin: 16px 0 0;
  font-size: 12px;
  line-height: 18px;
}
.home-cta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 36px;
}
.home-cta > a:not(.btn) {
  color: var(--label);
  text-decoration: none;
}
.home-cta > a:not(.btn):hover {
  color: var(--text);
}
@media (max-width: 700px) {
  .process {
    grid-template-columns: 1fr;
  }
}

/* Wrapping: headings split into even lines, paragraphs don't leave one word
   alone on the last line. */
h1,
h2,
h3,
.process b,
.process li > span {
  text-wrap: balance;
}
p,
li,
.lede,
.switch-row em {
  text-wrap: pretty;
}
.process .process-code + .process-link {
  margin-top: 4px;
}
.connect-dialog {
  max-height: calc(100vh - 48px);
  overflow-y: auto;
}
.dialog-x-form {
  position: absolute;
  top: 12px;
  right: 12px;
}
.dialog-x {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: none;
  color: var(--label);
  cursor: pointer;
}
.dialog-x:hover {
  background: #1a1a1a;
  color: var(--text);
}


/* Home (C2): the hero, a carousel of real tools, four feature rows, setup. */
.home-page {
  overflow-x: clip;
}
.home.home-hero {
  padding-bottom: 0;
}
.hero-cta {
  display: inline-block;
  width: fit-content;
  margin-top: 22px;
}
/* Big cards, about a third of a laptop window. marquee.js drives the motion
   (a springy stop on hover); without it, the CSS animation below runs. */
.marquee {
  --mq-w: clamp(280px, 30vw, 440px);
  --mq-gap: 18px;
  overflow: hidden;
  padding-top: 56px;
  padding-bottom: 8px;
}
.marquee-track {
  display: flex;
  gap: var(--mq-gap);
  width: max-content;
  animation: twist-marquee calc(var(--count) * 4s) linear infinite;
}
.marquee:hover .marquee-track,
.marquee:focus-within .marquee-track {
  animation-play-state: paused;
}
.marquee.js-driven .marquee-track {
  animation: none;
  will-change: transform;
}
/* Draggable sideways; up and down still scrolls the page on phones. The
   cursor stays as it is (the grab hand looks dated). */
.marquee.js-driven {
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}
.marquee.js-driven img {
  -webkit-user-drag: none;
}
/* Over the carousel, the pointer is a small glassy circle (marquee.js). */
.marquee.has-cursor,
.marquee.has-cursor * {
  cursor: none;
}
.mq-cursor {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 50;
  pointer-events: none;
}
.mq-cursor::before {
  content: '';
  position: absolute;
  left: -18px;
  top: -18px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.38);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    inset 0 -6px 12px rgba(255, 255, 255, 0.06),
    0 0 0 0.5px rgba(0, 0, 0, 0.35),
    0 10px 24px rgba(0, 0, 0, 0.35);
  -webkit-backdrop-filter: blur(6px) saturate(160%);
  backdrop-filter: blur(6px) saturate(160%);
  opacity: 0;
  transform: scale(0.4);
  transition:
    transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1),
    opacity 0.2s ease;
}
.mq-cursor.on::before {
  opacity: 1;
  transform: scale(1);
}
.mq-cursor.on.card::before {
  transform: scale(1.5);
}
.mq-cursor.on.press::before {
  transform: scale(1.15, 0.85);
  transition-duration: 0.15s;
}
@keyframes twist-marquee {
  to {
    transform: translateX(calc(-50% - var(--mq-gap) / 2));
  }
}
.mq-tool {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: var(--mq-w);
  flex-shrink: 0;
  text-decoration: none;
}
.mq-tool img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  height: auto;
  object-fit: cover;
  border: 1px solid #1f1f1f;
  border-radius: 12px;
  background: #111;
  transition:
    transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1),
    border-color 0.2s ease,
    box-shadow 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
}
/* the card under the pointer lifts, with a little bounce */
.mq-tool:hover img,
.mq-tool:focus-visible img {
  border-color: #3a3a3a;
  transform: translateY(-6px) scale(1.015);
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.8);
}
.mq-tool:focus-visible {
  outline: none;
}
.mq-tool > span {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
}
.mq-tool b {
  font-weight: 400;
  color: var(--text);
}
.mq-tool i {
  font-style: normal;
  font-size: 12px;
  color: var(--faint);
}
@media (prefers-reduced-motion: reduce) {
  .marquee {
    overflow-x: auto;
  }
  .marquee-track {
    animation: none;
    padding: 0 20px;
  }
}
.home.features {
  display: flex;
  flex-direction: column;
  gap: 56px;
  padding-top: 96px;
  padding-bottom: 0;
}
.feature {
  display: flex;
  align-items: center;
  gap: 40px;
}
.fv {
  width: 480px;
  flex-shrink: 0;
  border: 1px solid #262626;
  border-radius: 14px;
  background: #0d0d0d;
}
.fcopy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.fcopy h2 {
  margin: 0;
  font-size: 22px;
  line-height: 30px;
  font-weight: 500;
  color: var(--text);
}
.fcopy p {
  margin: 0;
  font-size: 13px;
  line-height: 21px;
  color: var(--label);
}
.fcopy a {
  color: var(--text-2);
}
.fv-publish {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
}
.fv-you {
  align-self: flex-end;
  padding: 9px 13px;
  border-radius: 12px;
  background: #1c1c1c;
  font-size: 13px;
  color: var(--text);
}
.fv-agent {
  display: flex;
  gap: 10px;
  font-size: 13px;
  line-height: 20px;
  color: #a3a3a3;
}
.fv-agent .cp-logo {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 2px;
}
.fv-agent > span {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.fv-chip {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  font-size: 12px;
  color: var(--text);
}
.fv-or {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--faint);
}
.fv-or::before,
.fv-or::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #1f1f1f;
}
.fv-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 22px 16px;
  border: 1px dashed #333;
  border-radius: 10px;
  color: var(--label);
  text-decoration: none;
}
.fv-drop b {
  font-weight: 400;
  font-size: 13px;
  color: var(--text);
}
.fv-drop span {
  font-size: 12px;
  color: var(--faint);
}
.fv.fv-card {
  margin: 0;
  border: 0;
  background: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.fv-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1200 / 630;
  border: 1px solid #262626;
  border-radius: 14px;
  background: #0d0d0d;
}
.fv-card figcaption {
  font-size: 12px;
  color: var(--faint);
}
.fv-profile {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
  text-decoration: none;
}
.fv-who {
  display: flex;
  align-items: center;
  gap: 12px;
}
.fv-who > span {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.fv-who b {
  font-weight: 500;
  font-size: 14px;
  color: var(--text);
}
.fv-who i {
  font-style: normal;
  font-size: 12px;
  color: var(--label);
}
.fv-tools {
  display: flex;
  gap: 10px;
}
.fv-tools > span {
  flex: 0 0 calc((100% - 20px) / 3);
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.fv-tools img {
  display: block;
  width: 100%;
  height: 88px;
  object-fit: cover;
  border: 1px solid #1f1f1f;
  border-radius: 6px;
}
.fv-tools > span > span {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  font-size: 12px;
}
.fv-tools b {
  font-weight: 400;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fv-tools i {
  font-style: normal;
  color: var(--faint);
}
.fv-sheet {
  display: flex;
  height: 220px;
  overflow: hidden;
  background: #0e0e10;
}
.fv-side {
  width: 250px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  background: var(--bg);
  border-right: 1px solid #1f1f1f;
  font-size: 12px;
  color: var(--label);
}
.fv-side i {
  font-style: normal;
  text-decoration: underline;
}
.fv-side b {
  font-weight: 500;
  font-size: 20px;
  line-height: 26px;
  color: var(--text);
}
.fv-btns {
  display: flex;
  gap: 6px;
  padding-top: 4px;
}
.fv-btns span {
  flex: 1;
  padding: 7px 0;
  border: 1px solid var(--border);
  border-radius: 7px;
  text-align: center;
  color: var(--text);
}
.fv-btns .on {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}
.fv-sheet img {
  display: block;
  flex: 1;
  min-width: 0;
  height: 100%;
  object-fit: cover;
  object-position: left center;
}
.also {
  display: flex;
  gap: 40px;
}
.also > div {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  line-height: 20px;
}
.also b {
  font-weight: 400;
  color: var(--text);
}
.also span {
  color: var(--label);
}
.home.get-started {
  padding-top: 104px;
  padding-bottom: 0;
}
.get-started h2 {
  margin: 0 0 6px;
  font-size: 22px;
  line-height: 30px;
  font-weight: 500;
}
.gs-line {
  margin: 0;
  font-size: 13px;
  color: var(--label);
}
.get-started .process {
  margin-top: 24px;
}
@media (max-width: 760px) {
  .feature {
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
  }
  .fv {
    width: 100%;
  }
  .fv-side {
    width: 52%;
  }
  .also {
    flex-direction: column;
    gap: 20px;
  }
  .marquee {
    --mq-w: 74vw;
    --mq-gap: 14px;
  }
}
/* Get started: a panel, so setup stands out at the end of the page. */
.gs-panel {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 32px;
  border: 1px solid #262626;
  border-radius: 18px;
  background: #0d0d0d;
}
.gs-head h2 {
  margin: 0 0 6px;
  font-size: 28px;
  line-height: 34px;
  font-weight: 500;
}
.gs-head p {
  margin: 0;
  font-size: 14px;
  color: var(--label);
}
.process.gs-steps {
  margin: 0;
}
.gs-steps li {
  background: var(--bg);
  border-color: #222;
}
.gs-steps .process-logos {
  gap: 12px;
}
.gs-steps .process-logos svg {
  width: 18px;
  height: 18px;
}
.gs-url {
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  margin-top: 2px;
  padding: 6px 9px;
  border: 1px solid var(--green-line);
  border-radius: 6px;
  background: var(--green-wash);
  font-size: 12px;
  color: var(--text);
  overflow-wrap: anywhere;
}
.gs-url i {
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
}
.gs-cta {
  display: flex;
  align-items: center;
  gap: 16px;
}
.gs-cta > a:not(.btn) {
  color: var(--label);
  text-decoration: none;
}
.gs-cta > a:not(.btn):hover {
  color: var(--text);
}
@media (max-width: 700px) {
  .gs-panel {
    padding: 20px;
  }
}
/* Home: questions, an expandable list after setup. */
.home.faq {
  padding-top: 96px;
}
.faq h2 {
  margin: 0 0 16px;
  font-size: 22px;
  line-height: 30px;
  font-weight: 500;
}
.faq-list {
  display: flex;
  flex-direction: column;
}
.faq-item {
  border-bottom: 1px solid #1c1c1c;
}
.faq-item summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 0;
  font-size: 14px;
  line-height: 20px;
  color: var(--text);
  cursor: pointer;
  list-style: none;
}
.faq-item summary::-webkit-details-marker {
  display: none;
}
.faq-item summary .chev {
  flex-shrink: 0;
  color: var(--label);
  transition: transform 0.15s ease;
}
.faq-item[open] summary .chev {
  transform: rotate(180deg);
}
.faq-item summary:hover .chev {
  color: var(--text);
}
.faq-item p {
  margin: 0;
  padding: 0 0 20px;
  max-width: 640px;
  font-size: 13px;
  line-height: 21px;
  color: var(--label);
}
.faq-item a {
  color: var(--text-2);
}
.faq .site-foot {
  margin-top: 64px;
}
.docs .code + ul,
.docs .code + p {
  margin-top: 14px;
}
.docs ul + p {
  margin-top: 14px;
}

/* Tool page: save and remix as two small icons in the header. A saved tool's
   bookmark fills in. */
.tf-acts {
  display: flex;
  align-items: center;
  gap: 2px;
}
.tf-act {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--label);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.15s ease, background 0.15s ease;
}
.tf-act:hover,
.tf-act:focus-visible {
  color: var(--text);
  background: #1a1a1a;
  outline: none;
}
.tf-act.on {
  color: var(--text);
}
.tf-act.on path {
  fill: currentColor;
}
.tf-act:disabled {
  opacity: 0.5;
}
/* The header's right side, on every page: a row of full-height cells, each
   after a divider, running out to the edge. Hovering fills the cell; the main
   action (publish, or sign up) fills white. */
.bar .nav {
  align-self: stretch;
  gap: 0;
  margin-right: -16px;
}
.bar .nav > * {
  align-self: stretch;
  display: flex;
  align-items: center;
  border-left: 1px solid #1c1c1c;
}
.bar .nav .tf-acts {
  gap: 0;
}
.bar .nav .tf-act,
.bar .nav .act-btn,
.bar .nav .acct-btn {
  width: 44px;
  height: auto;
  align-self: stretch;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.bar .nav .tf-act:hover,
.bar .nav .tf-act:focus-visible,
.bar .nav .act-btn:hover,
.bar .nav .act-btn[aria-expanded='true'],
.bar .nav .acct-btn:hover,
.bar .nav .acct-btn[aria-expanded='true'] {
  background: #161616;
  color: var(--text);
}
.bar .nav .acct-btn {
  width: 52px;
}
.bar .nav .acct-btn:hover .avatar,
.bar .nav .acct-btn[aria-expanded='true'] .avatar {
  box-shadow: none;
}
.bar .nav .act-dot {
  top: 10px;
  right: 11px;
}
.bar .nav .act .menu {
  top: calc(100% + 6px);
  right: 0;
}
.bar .nav .acct .menu {
  top: calc(100% + 6px);
  right: 8px;
}
.nav-signup,
.bar .nav .publish-btn {
  padding: 0 18px;
  color: var(--text);
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav a.nav-signup:hover,
.nav a.nav-signup:focus-visible,
.bar .nav a.publish-btn:hover,
.bar .nav a.publish-btn:focus-visible {
  background: var(--text);
  color: var(--bg);
  outline: none;
}

/* A toast with a link ("see saved") can be clicked. */
.toast.has-link {
  pointer-events: auto;
}
.toast a {
  margin-left: 8px;
  color: inherit;
  text-decoration: underline 1px;
  text-underline-offset: 3px;
}

/* Signing up over a tool, and the prompt after a remix. */
/* Two columns: what Twist is on the left, signing up on the right. Phones get
   the whole screen, with what Twist is on top. */
.join-dialog {
  width: min(720px, calc(100vw - 32px));
  padding: 0;
  overflow: hidden;
}
.join-dialog[open] {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
}
.join-why {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 24px;
  background: #0f0f0f;
  border-right: 1px solid #1f1f1f;
}
.join-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-weight: 500;
}
.join-pitch {
  margin: 0;
  color: var(--text);
  font-size: 16px;
  line-height: 24px;
  text-wrap: balance;
}
.join-points {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.join-points li {
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 10px;
  color: var(--label);
  font-size: 12px;
  line-height: 18px;
  transition: color 0.2s ease;
}
.join-points svg {
  margin-top: 1px;
}
.join-dialog[data-for='save'] [data-point='save'],
.join-dialog[data-for='remix'] [data-point='remix'] {
  color: var(--text);
}
.join-main {
  min-width: 0;
  padding: 24px;
}
@media (max-width: 640px) {
  .join-dialog {
    width: 100%;
    max-width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    border: 0;
    border-radius: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .join-dialog[open] {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }
  .join-dialog::backdrop {
    background: var(--bg);
  }
  .join-dialog .dialog-x-form {
    top: calc(12px + env(safe-area-inset-top));
    right: 12px;
  }
  .join-why {
    gap: 16px;
    padding: calc(22px + env(safe-area-inset-top)) 20px 24px;
    border-right: 0;
    border-bottom: 1px solid #1f1f1f;
  }
  .join-pitch {
    font-size: 18px;
    line-height: 26px;
  }
  .join-points {
    gap: 12px;
  }
  .join-main {
    padding: 24px 20px calc(24px + env(safe-area-inset-bottom));
  }
}
.join-dialog h2,
.remix-dialog h2 {
  padding-right: 32px;
}
.join-main h2 {
  margin-bottom: 18px;
}
.join-dialog .muted,
.remix-dialog .muted {
  margin: 0 0 16px;
  line-height: 20px;
}
.join-dialog .form-error {
  margin: -6px 0 14px;
}
.join-foot {
  margin: 16px 0 0;
  font-size: 12px;
  line-height: 18px;
  color: var(--label);
}
.join-foot a {
  color: var(--label);
  text-decoration: underline 1px var(--underline);
  text-underline-offset: 3px;
}
.join-foot a:hover {
  color: var(--text);
}
.remix-dialog {
  width: min(520px, calc(100vw - 32px));
}
.prompt-box {
  position: relative;
  margin: 0 0 16px;
  padding: 12px 14px 48px;
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  background: #111;
}
.prompt-box p {
  margin: 0;
  font-size: 12px;
  line-height: 19px;
  color: var(--text);
  user-select: all;
  -webkit-user-select: all;
}
.prompt-box .btn {
  position: absolute;
  right: 10px;
  bottom: 10px;
}
.remix-dialog .muted.then {
  margin: -4px 0 0;
}
.remix-dialog form.row {
  margin-top: 18px;
}

/* Publish: the agent tab once one is connected. */
.pub-ready-text {
  margin: 0;
  color: var(--label);
}
/* The two ways to publish, as tabs: radio buttons styled like the settings tabs. */
.pub-tabs {
  margin: 16px 0 20px;
}
.pub-tabs label {
  padding: 4px 0 6px;
  color: var(--label);
  border-bottom: 1px solid transparent;
  cursor: pointer;
}
.pub-tabs label:hover {
  color: var(--text);
}
.pub-tabs input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.pub-tabs label:has(input:checked) {
  color: var(--text);
  border-bottom-color: var(--text);
}
.pub-tabs label:has(input:focus-visible) {
  outline: 1px solid #3a3a3a;
  outline-offset: 4px;
}
.pub:has(input[name='pub-way'][value='agent']:checked) .pub-way[data-way='upload'],
.pub:has(input[name='pub-way'][value='upload']:checked) .pub-way[data-way='agent'] {
  display: none;
}

.join-next {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.join-next .btn {
  flex: 1 1 auto;
}

.pub-ready {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.pub-ready-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Admin overview: one big number, a row of counts, signups per day, and the
   newest accounts. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.tab-count {
  display: inline-block;
  margin-left: 6px;
  padding: 0 6px;
  border-radius: 999px;
  background: #2a2a2a;
  color: var(--text);
  font-size: 11px;
  line-height: 16px;
}
.adm-waiting {
  margin: -8px 0 20px;
}
.adm-waiting a {
  color: var(--amber);
}
.adm-hero {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 8px 0 22px;
}
.adm-hero b {
  font-size: 56px;
  line-height: 60px;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.adm-hero span {
  color: var(--label);
}
.adm-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1px;
  margin-bottom: 40px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--line);
  overflow: hidden;
}
.adm-tile {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  background: var(--bg);
}
.adm-tile-label {
  color: var(--label);
  font-size: 12px;
}
.adm-tile-value {
  font-size: 22px;
  line-height: 28px;
  font-weight: 500;
}
.adm-tile-note {
  color: var(--faint);
  font-size: 11px;
  line-height: 14px;
}
.adm-tile-note.up {
  color: var(--green);
}
.page.adm h2 {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 400;
  color: var(--label);
}
.adm-chart {
  margin: 0 0 40px;
}
.adm-plot {
  position: relative;
  height: 180px;
  padding-left: 28px;
  border-top: 1px solid #1c1c1c;
  border-bottom: 1px solid #2a2a2a;
}
.adm-tick {
  position: absolute;
  left: 0;
  color: var(--faint);
  font-size: 11px;
  line-height: 14px;
  font-variant-numeric: tabular-nums;
}
.adm-tick.top {
  top: 4px;
}
.adm-tick.base {
  bottom: 4px;
}
.adm-cols {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 100%;
}
.adm-col {
  position: relative;
  flex: 1;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  outline: none;
}
.adm-col i {
  display: block;
  width: 100%;
  max-width: 24px;
  min-height: 2px;
  border-radius: 4px 4px 0 0;
  background: #d4d4d4;
  transition: background 0.15s ease;
}
.adm-col:hover i,
.adm-col:focus-visible i {
  background: var(--text);
}
.adm-col:hover,
.adm-col:focus-visible {
  background: #111;
}
.adm-col i {
  position: relative;
}
/* The busiest day carries its number, just above its column. */
.adm-peak {
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  color: var(--text);
  font-size: 11px;
  font-style: normal;
  line-height: 14px;
  pointer-events: none;
}
.adm-col::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  padding: 5px 8px;
  border-radius: 6px;
  background: var(--text);
  color: var(--bg);
  font-size: 11px;
  line-height: 14px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease;
  z-index: 2;
}
.adm-col:hover::after,
.adm-col:focus-visible::after {
  opacity: 1;
}
.adm-cols .adm-col:first-child::after {
  left: 0;
  transform: none;
}
.adm-cols .adm-col:last-child::after {
  left: auto;
  right: 0;
  transform: none;
}
.adm-axis {
  display: flex;
  justify-content: space-between;
  padding-left: 28px;
  margin-top: 6px;
  color: var(--faint);
  font-size: 11px;
}
.adm-people {
  margin-bottom: 32px;
}
.adm-who {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.adm-who .avatar {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}
.adm-who .l span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.adm-meta {
  display: flex;
  gap: 14px;
  color: var(--label);
  font-size: 12px;
  white-space: nowrap;
}
.adm-more {
  color: var(--label);
  font-size: 12px;
}
@media (max-width: 640px) {
  .adm-hero b {
    font-size: 44px;
    line-height: 48px;
  }
  .adm-people .vrow {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 6px;
  }
  .adm-meta {
    padding-left: 40px;
  }
}

/* The profile's side column is mostly short lines: narrower than the editor's. */
.person {
  width: 320px;
}
@media (max-width: 900px) {
  .person {
    width: 100%;
  }
}
