@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@600&display=swap');

/* Registration wall and account chip. Everything is namespaced .pa-* so it can't collide with
   the tool pages' Tailwind or compare.css. Colors match the site (#15BBC1 electric on black). */

html.pa-locked { overflow: hidden; }

.pa-wall {
  position: fixed; inset: 0; z-index: 2000;
  display: grid; place-items: center; padding: 1rem; overflow-y: auto;
  background: rgba(0, 0, 0, 0.72);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: rgba(255, 255, 255, 0.92); line-height: 1.5;
}
.pa-wall *, .pa-chip * { box-sizing: border-box; }

.pa-card {
  width: min(60rem, 100%);
  display: grid; grid-template-columns: 1fr 1fr;
  background: #0a0a0a; border: 1px solid #222; border-radius: 1rem; overflow: hidden;
  box-shadow: 0 0 80px -20px rgba(21, 187, 193, 0.45);
}
.pa-card { position: relative; }
.pa-close {
  position: absolute; top: .6rem; right: .6rem; width: 2rem; height: 2rem; cursor: pointer;
  font: 400 1.4rem/1 'Inter', system-ui, sans-serif; color: rgba(255, 255, 255, 0.6);
  background: transparent; border: 0; border-radius: 50%;
}
.pa-close:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.pa-card--single { display: block; width: min(30rem, 100%); padding: 2rem; }
.pa-card h1 { margin: 0 0 1.25rem; font-size: 1.5rem; line-height: 1.2; font-weight: 700; }
.pa-card--single h1 { margin-bottom: .5rem; }
.pa-sub { margin: 0; color: rgba(255, 255, 255, 0.6); }

.pa-intro { padding: 2rem; background: linear-gradient(160deg, #06201f 0%, #0a0a0a 70%); }
.pa-logo { display: block; border-radius: 50%; margin-bottom: 1rem; }
.pa-props { list-style: none; padding: 0; margin: 0; display: grid; gap: .8rem; }
.pa-props li { display: grid; padding-left: 1.5rem; position: relative; }
.pa-props li::before { content: '\2713'; position: absolute; left: 0; color: #15BBC1; font-weight: 700; }

.pa-form { padding: 2rem; display: grid; gap: .9rem; align-content: start; }
.pa-form form { display: grid; gap: .5rem; }
.pa-form label { font-size: .85rem; color: rgba(255, 255, 255, 0.55); }
.pa-form input {
  width: 100%; font: inherit; color: inherit; background: #111;
  border: 1px solid #2a2a2a; border-radius: .5rem; padding: .6rem .75rem;
}
.pa-form input:focus { outline: none; border-color: #15BBC1; }
.pa-btn {
  margin-top: .5rem; font: 600 .8rem/1.2 'Orbitron', 'Inter', sans-serif; cursor: pointer;
  text-transform: uppercase; letter-spacing: .05em;
  background: #15BBC1; color: #00181a; border: 0; border-radius: .5rem; padding: .8rem 1rem;
}
.pa-btn:hover { filter: brightness(1.1); }
.pa-intro .pa-note { margin-top: 1.25rem; font-size: .9rem; }
.pa-intro h1 + .pa-note { margin-top: 0; }
/* The tools' "coming soon" card (wall.js → showComingSoon). */
.pa-card--single .pa-sub + .pa-sub { margin-top: .75rem; }
.pa-actions { margin-top: 1.25rem; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.25rem; }
.pa-actions .pa-btn { margin-top: 0; display: inline-block; text-decoration: none; }
.pa-link {
  padding: 0; font: inherit; font-size: .9rem; color: #15BBC1; cursor: pointer;
  background: none; border: 0; text-decoration: underline; text-underline-offset: 3px;
}
.pa-link:hover { color: #fff; }
.pa-msg { margin: 0; min-height: 1.3em; font-size: .85rem; color: #15BBC1; }
.pa-msg.is-error { color: #ff7b72; }
.pa-fine { margin: 0; font-size: .72rem; color: rgba(255, 255, 255, 0.5); }
.pa-wall.is-busy .pa-form { opacity: .6; pointer-events: none; }
.pa-wall :focus-visible, .pa-chip :focus-visible { outline: 2px solid #15BBC1; outline-offset: 2px; }

.pa-chip {
  /* Top right, just under the shared site header; scrolls away with the page. */
  position: absolute; right: 1rem; top: calc(var(--pc-header-h, 4rem) + .5rem); z-index: 900;
  display: flex; align-items: center; gap: .6rem; padding: .35rem .5rem .35rem .85rem;
  background: rgba(10, 10, 10, 0.92); border: 1px solid #222; border-radius: 999px;
  font: 500 .75rem/1.2 'Inter', system-ui, sans-serif; color: rgba(255, 255, 255, 0.65);
}
/* In a bar the Account button is the whole pill, so drop the floating frame around it. */
.pa-chip--inline { position: relative; top: auto; right: auto; padding: 0; border: 0; background: transparent; }
.pa-chip > button {
  font: inherit; font-weight: 600; cursor: pointer; color: #fff; background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 999px; padding: .25rem .7rem;
}
.pa-chip > button:hover { color: #15BBC1; border-color: #15BBC1; }
.pa-chip > .pa-chip__acct { display: inline-flex; align-items: center; gap: .4rem; padding-left: .25rem; }
.pa-chip__acct[aria-expanded="true"] { color: #15BBC1; border-color: #15BBC1; }

/* In the shared site header (#pc-account): sized like its Research / Tools / Community pills, and the
   panel pinned under the header's right edge (the button isn't at the edge on phones). */
.pc-account .pa-chip { font-size: .875rem; }
.pc-account .pa-chip > .pa-chip__acct { padding: .4rem 1rem .4rem .4rem; gap: .5rem; border-color: rgba(255, 255, 255, 0.15); color: rgba(255, 255, 255, 0.8); }
.pc-account .pa-chip > .pa-chip__acct:hover,
.pc-account .pa-chip__acct[aria-expanded="true"] { color: #15BBC1; border-color: rgba(21, 187, 193, 0.6); }
.pc-account .pa-avatar--sm { width: 1.5rem; height: 1.5rem; font-size: .75rem; }
.pc-account .pa-acct { position: fixed; top: calc(var(--pc-header-h, 4rem) + .5rem); right: max(1rem, calc((100vw - 80rem) / 2 + 1.5rem)); }
/* Sign in, for signed-out visitors on pages where signing in is optional (blog, phathom.io). */
.pa-signin {
  cursor: pointer; font: 600 .75rem/1.25 'Inter', system-ui, sans-serif; color: #15BBC1; background: transparent;
  border: 1px solid rgba(21, 187, 193, 0.6); border-radius: 999px; padding: .3rem .8rem;
  transition: background-color .15s;
}
.pa-signin:hover { background: rgba(21, 187, 193, 0.1); }
.pa-signin:disabled { opacity: .6; cursor: progress; }
.pa-signin:focus-visible { outline: 2px solid #15BBC1; outline-offset: 2px; }
.pc-account .pa-signin { padding: .5rem 1rem; font-size: .875rem; }
/* Phones: no room beside the logo and menu button for the word, so just the icon. */
@media (max-width: 639px) {
  .pc-account .pa-chip > .pa-chip__acct { padding: .3rem; }
  .pc-account .pa-chip__label { display: none; }
  .pc-account .pa-signin { padding: .4rem .8rem; font-size: .8rem; }
}

/* Member icon: an uploaded image, or the username's initial on a color. */
.pa-avatar {
  display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center; overflow: hidden;
  border-radius: 50%; background: #222; color: rgba(0, 0, 0, 0.8); font-weight: 700;
}
.pa-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pa-avatar--blank { background: #2a2a2a; color: rgba(255, 255, 255, 0.55); }
.pa-avatar--blank svg { width: 65%; height: 65%; margin-top: 12%; }
.pa-avatar--sm { width: 1.25rem; height: 1.25rem; font-size: .65rem; }
.pa-avatar--lg { width: 4rem; height: 4rem; font-size: 1.6rem; }

/* Account panel, opened from the pill. */
.pa-acct {
  position: absolute; right: 0; top: calc(100% + .5rem); z-index: 10;
  width: min(24rem, calc(100vw - 2rem)); max-height: calc(100vh - var(--pc-header-h, 4rem) - 5rem); overflow-y: auto;
  background: #0a0a0a; border: 1px solid #222; border-radius: 1rem; padding: 1.1rem 1.25rem 1.25rem;
  box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.8), 0 0 60px -25px rgba(21, 187, 193, 0.45);
  font: 400 .85rem/1.45 'Inter', system-ui, sans-serif; color: rgba(255, 255, 255, 0.9);
}
.pa-acct form { display: grid; gap: 1rem; }
.pa-acct__head { display: flex; align-items: center; justify-content: space-between; }
.pa-acct__head h2 { margin: 0; font-size: 1rem; font-weight: 700; }
.pa-acct__x {
  width: 1.9rem; height: 1.9rem; cursor: pointer; border: 0; border-radius: 50%;
  font: 400 1.3rem/1 'Inter', system-ui, sans-serif; color: rgba(255, 255, 255, 0.6); background: transparent;
}
.pa-acct__x:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.pa-acct__icon { display: flex; gap: 1rem; align-items: center; }
.pa-acct__row { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .9rem; }
.pa-acct__label { display: block; margin: 0 0 .3rem; font-size: .75rem; font-weight: 600; color: rgba(255, 255, 255, 0.6); }
.pa-acct__hint { display: block; margin: .3rem 0 0; font-size: .72rem; color: rgba(255, 255, 255, 0.45); }
.pa-acct__count { text-align: right; }
.pa-acct__field { display: block; }
.pa-acct__check { display: flex; align-items: center; gap: .55rem; font-size: .82rem; color: rgba(255, 255, 255, 0.8); cursor: pointer; }
.pa-acct__check input { width: 1rem; height: 1rem; margin: 0; accent-color: #15BBC1; }
.pa-acct input[type="text"], .pa-acct select, .pa-acct textarea {
  width: 100%; font: inherit; color: #fff; background: #111;
  border: 1px solid #2a2a2a; border-radius: .5rem; padding: .5rem .65rem;
}
.pa-acct textarea { resize: vertical; min-height: 4.5rem; }
.pa-acct select { color-scheme: dark; }
.pa-acct input:focus, .pa-acct select:focus, .pa-acct textarea:focus { outline: none; border-color: #15BBC1; }
.pa-acct__upload {
  position: relative; cursor: pointer; font-weight: 600; color: #15BBC1;
  border: 1px solid rgba(21, 187, 193, 0.5); border-radius: 999px; padding: .25rem .75rem;
}
.pa-acct__upload:hover { background: rgba(21, 187, 193, 0.1); }
.pa-acct__upload:focus-within { outline: 2px solid #15BBC1; outline-offset: 2px; }
.pa-acct__upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.pa-acct__link {
  font: inherit; cursor: pointer; padding: 0; border: 0; background: transparent;
  color: rgba(255, 255, 255, 0.6); text-decoration: underline; text-underline-offset: 2px;
}
.pa-acct__link:hover { color: #15BBC1; }
.pa-acct__link[hidden] { display: none; }
.pa-acct__email { justify-content: space-between; }
.pa-acct__email span { overflow-wrap: anywhere; color: rgba(255, 255, 255, 0.85); }
.pa-acct__warn { margin: .4rem 0 0; font-size: .8rem; color: #ff7b72; }
.pa-acct__warn a { color: inherit; font-weight: 600; }
.pa-acct__msg { margin: 0; min-height: 1.2em; font-size: .8rem; color: #15BBC1; }
.pa-acct__msg.is-error { color: #ff7b72; }
.pa-acct__msg:empty { display: none; }
.pa-acct__submit { margin-top: 0; width: 100%; }
.pa-acct__submit:disabled { opacity: .6; cursor: progress; }
.pa-acct__profile { justify-self: center; font-size: .78rem; color: rgba(255, 255, 255, 0.6); }
.pa-acct__profile:hover { color: #15BBC1; }
.pa-acct__profile[hidden] { display: none; }
.pa-acct__logout {
  margin-top: .1rem; padding: .55rem 1rem; cursor: pointer; font: inherit; font-weight: 600;
  color: rgba(255, 255, 255, 0.75); background: transparent; border: 1px solid #2a2a2a; border-radius: .5rem;
}
.pa-acct__logout:hover { color: #ff7b72; border-color: rgba(255, 123, 114, 0.5); }
.pa-acct :focus-visible { outline: 2px solid #15BBC1; outline-offset: 2px; }

@media (max-width: 760px) {
  .pa-card { grid-template-columns: 1fr; }
  .pa-intro, .pa-form { padding: 1.25rem; }
}
