/* The sign-in and projects pages of the designer. Same chrome as the IDE: the blue bar, Segoe
   UI, the pale ground. The one thing with character is the project tile, drawn as the small
   app window the project builds - a title bar in the project's own accent with its logo. */
:root {
  --top: #0058ad;
  --bg: #f5f6f8;
  --card: #ffffff;
  --line: #d0d4d9;
  --fg: #333333;
  --dim: #6b7280;
  --tint: #e8f0fb;
  --accent: #2f6fd0;
  --green: #2e8b46;
  --amber: #b8860b;
  --red: #c62828;
  --radius: 6px;
}

* {
  box-sizing: border-box;
}

body.projects {
  margin: 0;
  min-height: 100vh;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 13px;
  line-height: 1.45;
  color: var(--fg);
  background: var(--bg);
}

a {
  color: var(--accent);
}

/* --- the bar ------------------------------------------------------------- */

.pj-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 43px;
  padding: 0 18px;
  background: var(--card);
  color: var(--fg);
  border-bottom: 1px solid var(--line);
}

.pj-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.2px;
  color: #1f2937;
  text-decoration: none;
}

.brand-mark {
  width: 24px;
  height: 22px;
  flex: 0 0 auto;
  color: #147efc;
}

/* The section links after the brand: Projects and Templates scroll to their sections and the
   one in view is marked as current; Docs has nowhere to go yet, so it is not a link. */
.pj-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: 10px;
}

.pj-navlink {
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 14px;
  color: #4b5563;
  text-decoration: none;
  white-space: nowrap;
}

.pj-navlink[href]:hover {
  color: #1f2937;
  background: #f0f2f5;
}

.pj-navlink.is-current {
  color: #1f2937;
  background: #eceff3;
}

.pj-navlink.is-soon {
  cursor: default;
}

.pj-bar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}

/* The signed-in user: avatar and name in a pill that opens the user menu. */
.pj-userbtn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: inherit;
  color: var(--fg);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 3px 8px 3px 4px;
  cursor: pointer;
}

.pj-userbtn:hover,
.pj-userbtn[aria-expanded='true'] {
  background: var(--tint);
}

.pj-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  overflow: hidden;
}

.pj-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pj-avatar-initials {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
}

.pj-chevron {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  color: var(--dim);
}

.pj-link {
  background: none;
  border: 1px solid var(--line);
  color: var(--fg);
  font: inherit;
  padding: 3px 10px;
  border-radius: 4px;
  cursor: pointer;
}

.pj-link:hover {
  background: var(--tint);
}

/* --- the page ------------------------------------------------------------ */

.pj-main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px 24px 60px;
}

.pj-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.pj-head h1 {
  font-size: 22px;
  font-weight: 600;
  margin: 0;
}

.pj-count {
  color: var(--dim);
}

.pj-search {
  margin-left: auto;
  font: inherit;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  width: 240px;
  max-width: 100%;
}

.pj-search:focus {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
}

.pj-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

/* --- a project tile ------------------------------------------------------ */

.pj-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 190px;
}

.pj-card:focus-within,
.pj-card:hover {
  border-color: #9aa3ad;
}

/* The little app window: a title bar in the project's accent, the logo or initials in it. */
.pj-window {
  height: 74px;
  background: var(--tile, var(--accent));
  color: #fff;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
}

.pj-window-dots {
  position: absolute;
  top: 10px;
  right: 12px;
  display: flex;
  gap: 5px;
}

.pj-window-dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
}

.pj-logo {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex: 0 0 auto;
}

.pj-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.pj-initials {
  font-size: 18px;
  font-weight: 700;
  color: var(--tile, var(--accent));
}

.pj-window-name {
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pj-body {
  padding: 12px 16px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.pj-name {
  font-size: 15px;
  font-weight: 600;
  margin: 0;
}

.pj-meta {
  color: var(--dim);
  margin: 0;
}

.pj-address {
  color: var(--dim);
  font-size: 12px;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pj-address a {
  color: inherit;
  text-decoration: none;
}

.pj-address a:hover {
  text-decoration: underline;
}

.pj-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--dim);
}

.pj-status::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #b0b7bf;
}

.pj-status-running::before {
  background: var(--green);
}

.pj-status-starting::before,
.pj-status-stopping::before {
  background: var(--amber);
}

.pj-status-failed {
  color: var(--red);
}

.pj-status-failed::before {
  background: var(--red);
}

.pj-error {
  font-size: 12px;
  color: var(--red);
  white-space: pre-wrap;
  max-height: 60px;
  overflow: auto;
  margin: 0;
}

.pj-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px 12px;
}

.pj-btn {
  font: inherit;
  padding: 5px 12px;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--fg);
  cursor: pointer;
  text-decoration: none;
}

.pj-btn:hover {
  background: var(--tint);
  border-color: #b7c5d9;
}

.pj-btn-primary {
  background: var(--top);
  border-color: var(--top);
  color: #fff;
}

.pj-btn-primary:hover {
  background: #004a90;
  border-color: #004a90;
}

.pj-btn-danger {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.pj-btn:disabled {
  opacity: 0.55;
  cursor: default;
}

.pj-more {
  margin-left: auto;
  width: 30px;
  padding: 5px 0;
  text-align: center;
  font-size: 16px;
  line-height: 1;
}

.pj-menu {
  position: fixed;
  z-index: 20;
  min-width: 160px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 6px 18px rgba(20, 30, 50, 0.14);
  padding: 4px;
}

.pj-menu button {
  display: block;
  width: 100%;
  text-align: left;
  font: inherit;
  background: none;
  border: 0;
  padding: 6px 10px;
  border-radius: 4px;
  cursor: pointer;
  color: var(--fg);
}

.pj-menu button:hover {
  background: var(--tint);
}

.pj-menu button.pj-menu-danger {
  color: var(--red);
}

/* The user menu: who is signed in above the items. */
.pj-usermenu {
  min-width: 240px;
  max-width: 320px;
}

.pj-menu-who {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 10px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 4px;
}

.pj-menu-who .pj-avatar {
  width: 36px;
  height: 36px;
}

.pj-menu-who .pj-avatar-initials {
  font-size: 13px;
}

.pj-menu-who-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.pj-menu-who-text strong,
.pj-menu-who-text span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pj-menu-who-text strong {
  font-size: 13px;
  color: var(--fg);
}

.pj-menu-who-text span {
  font-size: 12px;
  color: var(--dim);
}

/* The new-project tile is an invitation, drawn as an empty window. */
.pj-new {
  border-style: dashed;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--dim);
  cursor: pointer;
  background: transparent;
  font: inherit;
}

.pj-new:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--card);
}

.pj-new-plus {
  font-size: 32px;
  line-height: 1;
}

.pj-empty {
  grid-column: 1 / -1;
  padding: 40px 0 8px;
  color: var(--dim);
  max-width: 60ch;
}

/* --- the templates ------------------------------------------------------- */

/* Projects in the bar scrolls to the very top of the page, bar included: the margin is more
   than what sits above the section, so the scroll clamps at 0. */
#projects-section {
  scroll-margin-top: 100px;
}

.pj-section {
  margin-top: 40px;
  scroll-margin-top: 20px;
}

.pj-hint {
  flex-basis: 100%;
  margin: -8px 0 0;
  color: var(--dim);
}

.pj-tpl {
  cursor: pointer;
}

.pj-tpl:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* The picture of the app, or the accent window when there is none yet. */
.pj-shot {
  aspect-ratio: 16 / 9;
  background: var(--tint);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  position: relative;
}

.pj-shot-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.pj-shot-fallback {
  height: 100%;
  justify-content: center;
}

.pj-desc {
  margin: 0;
  color: var(--dim);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* The closer look: a stage for the pictures as wide as the screen allows, the whole
   description under it. Two classes on the selector, so it wins over dialog.pj-dialog's width. */
dialog.pj-dialog.pj-tpl-dialog {
  /* As wide as the screen allows, and no wider than the stage's 16:9 picture can be at the
     height left for it (the 42px are the body's padding), so the picture fills the stage. */
  width: min(1240px, calc(100vw - 48px), calc((100vh - 340px) * 16 / 9 + 42px));
  max-height: calc(100vh - 48px);
}

.pj-tpl-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 20px 16px;
  max-height: calc(100vh - 48px);
  overflow: auto;
}

.pj-tpl-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pj-tpl-head h2 {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pj-tpl-close {
  font: inherit;
  font-size: 20px;
  line-height: 1;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--dim);
  cursor: pointer;
}

.pj-tpl-close:hover {
  background: var(--tint);
  color: var(--fg);
}

/* 16:9 like the captures, but never so tall that the description and the buttons fall off
   the screen: on a short window the picture shrinks and keeps its proportions. */
.pj-tpl-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  max-height: calc(100vh - 340px);
  min-height: 240px;
  flex: 0 0 auto;
  background: #1c2430;
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pj-tpl-stage .pj-shot-fallback {
  width: 100%;
}

.pj-tpl-media {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #1c2430;
}

.pj-tpl-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  color: #1f2937;
  font: inherit;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.75;
}

.pj-tpl-nav:hover {
  opacity: 1;
}

.pj-tpl-prev {
  left: 10px;
}

.pj-tpl-next {
  right: 10px;
}

.pj-tpl-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 12px;
  font-size: 12px;
  color: var(--dim);
}

.pj-tpl-dots {
  display: flex;
  gap: 6px;
  margin-left: auto;
}

.pj-tpl-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--line);
  cursor: pointer;
}

.pj-tpl-dot-on {
  background: var(--accent);
}

.pj-tpl-desc {
  white-space: pre-line;
  max-height: 26vh;
  overflow: auto;
  max-width: 90ch;
}

/* --- messages ------------------------------------------------------------ */
/* The Messages button in the bar with its count of unread answers, and the conversation
   dialog (projects/chat-dialog.js): the notice that nothing here is live, the bubbles - the
   user's on the right in the tint, the administrators' on the left - and the composer. */

.pj-iconbtn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--fg);
  cursor: pointer;
}

.pj-iconbtn:hover {
  background: var(--tint);
}

.pj-iconbtn svg {
  width: 18px;
  height: 18px;
}

.pj-iconbtn-off {
  color: var(--dim);
}

/* The nudge for someone who has never written: two shakes, the tint behind; a colour pulse
   alone for those who asked for less motion. */
@keyframes pj-shake {
  0%,
  100% {
    transform: translateX(0) rotate(0);
  }
  15% {
    transform: translateX(-3px) rotate(-8deg);
  }
  30% {
    transform: translateX(3px) rotate(8deg);
  }
  45% {
    transform: translateX(-3px) rotate(-6deg);
  }
  60% {
    transform: translateX(3px) rotate(6deg);
  }
  75% {
    transform: translateX(-2px) rotate(-3deg);
  }
  90% {
    transform: translateX(2px) rotate(3deg);
  }
}

@keyframes pj-pulse {
  0%,
  100% {
    background: transparent;
  }
  50% {
    background: var(--tint);
    color: var(--top);
  }
}

.pj-iconbtn-shake {
  animation: pj-shake 0.7s ease-in-out 2;
  background: var(--tint);
  color: var(--top);
}

@media (prefers-reduced-motion: reduce) {
  .pj-iconbtn-shake {
    animation: pj-pulse 1.4s ease-in-out 1;
    background: transparent;
    color: var(--fg);
  }
}

.pj-badge {
  position: absolute;
  top: -4px;
  right: -8px;
  min-width: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}

.pj-badge[hidden] {
  display: none;
}

/* Two classes on the selector, so it wins over dialog.pj-dialog's width. */
dialog.pj-dialog.pj-chat-dialog {
  width: min(640px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
}

.pj-chat-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 20px;
  height: min(720px, calc(100vh - 48px));
}

.pj-chat-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.pj-chat-head > div {
  flex: 1;
}

.pj-chat-sub {
  margin-top: 2px;
  font-size: 12px;
  color: var(--dim);
}

/* The invitation above the conversation: the page's tint, no icon - a note, not a warning. */
.pj-chat-notice {
  padding: 9px 12px;
  border: 1px solid #cddcf2;
  border-radius: var(--radius);
  background: var(--tint);
  color: var(--fg);
  font-size: 12.5px;
  line-height: 1.45;
}

.pj-chat-log {
  flex: 1 1 auto;
  min-height: 200px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 4px 2px;
}

.pj-chat-loading {
  padding: 12px 0;
  color: var(--dim);
}

.pj-chat-msg {
  max-width: 78%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.pj-chat-theirs {
  align-self: flex-start;
  background: var(--card);
  border-bottom-left-radius: 3px;
}

.pj-chat-mine {
  align-self: flex-end;
  background: var(--tint);
  border-color: #cddcf2;
  border-bottom-right-radius: 3px;
}

.pj-chat-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--fg);
}

.pj-chat-meta {
  display: flex;
  gap: 6px;
  margin-top: 4px;
  font-size: 11px;
  color: var(--dim);
}

.pj-chat-who {
  font-weight: 600;
}

.pj-chat-empty,
.pj-chat-off {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  max-width: 40ch;
  margin: auto;
  padding: 24px 12px;
  text-align: center;
  color: var(--dim);
}

.pj-chat-empty svg,
.pj-chat-off svg {
  width: 28px;
  height: 28px;
  color: #b8bfc8;
}

.pj-chat-off svg {
  color: var(--amber);
}

.pj-chat-empty strong,
.pj-chat-off strong {
  color: var(--fg);
}

.pj-chat-status {
  padding-top: 8px;
  border-top: 1px dashed var(--line);
  font-size: 12px;
  color: var(--dim);
  text-align: center;
}

.pj-chat-compose {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pj-chat-input {
  font: inherit;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--fg);
  line-height: 1.45;
  min-height: 40px;
  max-height: 160px;
  resize: none;
}

.pj-chat-input:focus {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
}

.pj-chat-input:disabled {
  opacity: 0.6;
}

.pj-chat-compose-foot {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pj-chat-foot-text {
  flex: 1;
  min-width: 0;
  font-size: 12px;
}

.pj-chat-hint {
  color: var(--dim);
}

.pj-chat-hint[hidden] {
  display: none;
}

.pj-chat-count {
  font-size: 12px;
  color: var(--dim);
}

.pj-chat-count[hidden] {
  display: none;
}

.pj-chat-count.pj-over {
  color: var(--red);
  font-weight: 600;
}

/* --- dialogs ------------------------------------------------------------- */

dialog.pj-dialog {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0;
  width: min(420px, calc(100vw - 32px));
  color: var(--fg);
  font: inherit;
}

dialog.pj-dialog::backdrop {
  background: rgba(30, 40, 60, 0.35);
}

.pj-dialog form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 20px 16px;
}

.pj-dialog h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.pj-dialog p {
  margin: 0;
  color: var(--dim);
}

.pj-dialog label {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pj-dialog label.pj-check {
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.pj-dialog input[type='text'],
.pj-dialog input[type='password'] {
  font: inherit;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.pj-dialog input[type='text']:focus,
.pj-dialog input[type='password']:focus {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
}

.pj-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}

.pj-dialog-error {
  color: var(--red);
  margin: 0;
}

/* --- sign-in -------------------------------------------------------------- */

.pj-login {
  max-width: 400px;
  margin: 12vh auto 0;
  padding: 0 20px;
}

.pj-login h1 {
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 4px;
}

.pj-login .pj-note {
  color: var(--dim);
  margin: 0 0 22px;
}

.pj-signin {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pj-dim {
  color: var(--dim);
  margin: 0;
}

.pj-oauth {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  font: inherit;
  font-weight: 600;
  padding: 9px 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  color: var(--fg);
}

.pj-oauth svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.pj-oauth:hover,
.pj-oauth:focus-visible {
  border-color: var(--accent);
  outline: none;
  background: var(--tint);
}

.pj-oauth:disabled {
  opacity: 0.55;
  cursor: default;
}

.pj-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--dim);
  font-size: 12px;
}

.pj-divider::before,
.pj-divider::after {
  content: '';
  flex: 1;
  border-top: 1px solid var(--line);
}

.pj-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pj-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pj-field input {
  font: inherit;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--card);
  color: var(--fg);
}

.pj-field input:focus {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
}

.pj-field-error,
.pj-form-error {
  color: var(--red);
  font-size: 12px;
  margin: 0;
}

.pj-field-error[hidden],
.pj-form-error[hidden] {
  display: none;
}

.pj-submit {
  padding: 8px 14px;
  font-weight: 600;
}

.pj-form-links {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.pj-form-links .pj-link {
  border: none;
  padding: 0;
  color: var(--accent);
}

.pj-form-links .pj-link:hover {
  background: none;
  text-decoration: underline;
}

.pj-state {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.pj-state p {
  margin: 0;
}

.pj-state-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pj-state-actions-column {
  flex-direction: column;
}

.pj-state-actions-column .pj-btn {
  padding: 8px 14px;
}

.pj-busy {
  cursor: progress;
}

.pj-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: #2b3440;
  color: #fff;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 13px;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }

  .pj-btn,
  .pj-card,
  .pj-oauth {
    transition: border-color 120ms ease, background-color 120ms ease;
  }
}
