/* ============================================================
   BORG SITES, Create New Site (/create)

   The builder's dark chrome (build.css: its colors, buttons, chips and
   fields), laid out as one calm page: the big question, the building
   moment, or the template gallery. Every text pair here is one of the
   pairs measured at the top of build.css.
   ============================================================ */

body.create { height: auto; min-height: 100vh; overflow: auto; }

.cbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px; height: var(--b-bar-h); padding: 0 12px 0 10px;
  background: rgba(10, 14, 39, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--b-line);
}
.cbar__title { font-family: var(--font-display); font-weight: 600; font-size: .9375rem; margin-right: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cbar__credits { color: var(--b-text-2); font-size: .8125rem; white-space: nowrap; }

.cmain {
  position: relative; min-height: calc(100vh - var(--b-bar-h)); padding: 56px 20px 80px;
  background:
    radial-gradient(60% 50% at 20% 0%, rgba(46, 125, 246, .14), transparent 70%),
    radial-gradient(50% 40% at 90% 10%, rgba(224, 53, 158, .10), transparent 70%),
    var(--b-bg);
}
.cstep { width: min(760px, 100%); margin: 0 auto; }
.cstep__orb {
  display: block; width: 52px; height: 52px; border-radius: 50%; margin-bottom: 22px;
  background: conic-gradient(from 210deg, var(--brand-1), var(--brand-2), var(--brand-3), var(--brand-4), var(--brand-1));
  box-shadow: 0 0 0 8px rgba(123, 63, 228, .12), 0 18px 50px -12px rgba(224, 53, 158, .55);
  animation: b-spin 9s linear infinite;
}
.cstep__orb--busy { animation-duration: 2.4s; }
.cstep__title { font-size: clamp(1.875rem, 1.4rem + 2vw, 2.75rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.cstep__lead { margin-top: 12px; max-width: 60ch; color: var(--b-text-2); font-size: 1rem; line-height: 1.6; }

/* ---------- the question ---------- */
.cask { margin-top: 28px; }
.cask__box {
  position: relative; border-radius: 16px; background: var(--b-panel); border: 1px solid var(--b-control);
  transition: border-color var(--b-fast) var(--ease), box-shadow var(--b-fast) var(--ease);
}
.cask__box:focus-within { border-color: var(--b-focus); box-shadow: 0 0 0 4px rgba(46, 125, 246, .2); }
.cask__input {
  display: block; width: 100%; min-height: 168px; padding: 18px 20px 34px; border: 0; border-radius: 16px;
  background: transparent; color: var(--b-text); font-size: 1.0625rem; line-height: 1.6; resize: vertical;
}
.cask__input::placeholder { color: var(--b-text-2); opacity: 1; }
.cask__input:focus-visible { outline: none; }
.cask__count { position: absolute; right: 16px; bottom: 10px; font-size: .75rem; color: var(--b-text-2); font-variant-numeric: tabular-nums; }

.ckinds { margin: 20px 0 0; padding: 0; border: 0; min-width: 0; }
.ckinds__legend { padding: 0; margin-bottom: 10px; font-family: var(--font-display); font-weight: 600; font-size: .8125rem; color: var(--b-text-2); }
.ckinds__list { display: flex; flex-wrap: wrap; gap: 8px; }
.ckinds .bchip[aria-pressed="true"] { border-color: transparent; background: linear-gradient(var(--b-card), var(--b-card)) padding-box, var(--grad-brand) border-box; }

.cnote { margin-top: 16px; color: var(--b-text-2); font-size: .875rem; }
.cerror { margin-top: 16px; color: var(--b-err); font-size: .875rem; font-weight: 500; }
.cerror:empty { display: none; }
.cerror a { color: var(--b-text); font-weight: 600; }

.cask__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.cbtn--lg { height: 52px; padding: 0 24px; font-size: .9375rem; border-radius: 12px; }
.cask__cost { margin-top: 12px; color: var(--b-text-2); font-size: .8125rem; }

/* ---------- building ---------- */
.cbuilding { text-align: left; }
.cbuilding__bar { display: block; width: 100%; max-width: 420px; height: 3px; border-radius: 3px; margin-top: 22px; }
.csteps { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 14px; }
.csteps__item { display: flex; align-items: center; gap: 14px; color: var(--b-text-2); font-size: 1.0625rem; font-weight: 500; transition: color .3s var(--ease); }
.csteps__mark { position: relative; flex: none; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--b-line); }
.csteps__item.is-active { color: var(--b-text); }
.csteps__item.is-active .csteps__mark { border-color: transparent; background: conic-gradient(var(--brand-1), var(--brand-2), var(--brand-3), var(--brand-4), var(--brand-1)); animation: b-spin 1.2s linear infinite; }
.csteps__item.is-active .csteps__mark::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--b-bg); }
.csteps__item.is-done { color: var(--b-text); }
.csteps__item.is-done .csteps__mark { border-color: var(--b-ok); background: var(--b-ok-bg); }
.csteps__item.is-done .csteps__mark::after { content: ""; position: absolute; left: 7px; top: 5px; width: 6px; height: 11px; border-right: 2px solid var(--b-ok); border-bottom: 2px solid var(--b-ok); transform: rotate(45deg); }

/* ---------- the gallery ---------- */
.cpick { width: min(1100px, 100%); }
.cgallery { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 16px; }
.ccard {
  display: flex; flex-direction: column; height: 100%; overflow: hidden;
  border-radius: 14px; border: 1px solid var(--b-line); background: var(--b-panel);
  transition: border-color var(--b-fast) var(--ease), transform .24s var(--ease-out), box-shadow .24s var(--ease-out);
}
.ccard:hover { border-color: var(--b-control); transform: translateY(-3px); box-shadow: 0 24px 50px -24px rgba(0, 0, 0, .9); }
.ccard__thumb {
  display: block; aspect-ratio: 16 / 10;
  background:
    radial-gradient(120% 120% at 18% 12%, var(--thumb-m1, #5B8DEF) 0%, transparent 60%),
    radial-gradient(120% 120% at 88% 92%, var(--thumb-m2, #8B5CF6) 0%, transparent 55%),
    var(--thumb-bg, #0C1230);
}
.ccard__body { display: flex; flex-direction: column; flex: 1 1 auto; gap: 4px; padding: 14px 14px 16px; }
.ccard__name { font-family: var(--font-display); font-weight: 700; font-size: 1rem; }
.ccard__cat { color: var(--b-text-2); font-size: .8125rem; }
.ccard__actions { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 12px; }
.ccard__actions .bbtn--primary { flex: 1 1 auto; }
.cpick__back { margin-top: 28px; }

@media (max-width: 599.98px) {
  .cmain { padding: 36px 16px 64px; }
  .cbar__title { display: none; }
  .cbar__credits { margin-left: auto; }
  .cask__actions .bbtn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .cstep__orb, .csteps__item.is-active .csteps__mark { animation: none; }
}
