:root {
  color-scheme: dark;
  font-family: Inter, Segoe UI, system-ui, sans-serif;
  background: #0f1117;
  color: #f2f4f8;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background: radial-gradient(circle at 0 0, #1a2030, #0f1117 48%);
}

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

button {
  cursor: pointer;
}

.site-shell {
  width: min(1420px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 1rem;
}

.panel {
  background: #141924;
  border: 1px solid #252c3b;
  border-radius: 14px;
  padding: 1rem;
}

.panel h1,
.panel h2,
.panel h3,
.panel h4 {
  margin: 0;
}

.landing {
  width: min(680px, 100%);
  min-height: calc(100vh - 2rem);
  margin: 0 auto;
  display: grid;
  align-content: center;
  gap: 1rem;
  text-align: center;
}

.landing h1 {
  font-size: clamp(2.2rem, 6vw, 4.8rem);
  letter-spacing: -0.06em;
}

.landing p {
  margin: 0;
  color: #aeb8cf;
  font-size: 1.05rem;
}

.role-actions,
.social-actions {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 0.5rem;
}

.primary,
.secondary,
.social-button {
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
  color: white;
  font-weight: 600;
}

.primary {
  border: none;
  background: linear-gradient(135deg, #4b86ff, #7b6bff);
}

.secondary,
.social-button {
  border: 1px solid #3b465d;
  background: #1c2534;
}

.social-button.google {
  border-color: #5574b4;
}

.social-button.x {
  border-color: #66717f;
}

.gate {
  width: min(560px, 100%);
  margin: 8vh auto 0;
  display: grid;
  gap: 0.8rem;
}

.gate > p {
  margin: 0;
  color: #aeb8cf;
}

.back-button,
.text-button,
.link-btn {
  width: fit-content;
  padding: 0;
  border: none;
  background: transparent;
  color: #8fb9ff;
}

.back-button {
  color: #aeb8cf;
}

.text-button {
  text-align: left;
}

.invite-form {
  display: grid;
  gap: 0.4rem;
}

.invite-form label,
label {
  display: grid;
  gap: 0.35rem;
  color: #d9e0f0;
  font-size: 0.92rem;
}

.invite-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
}

.workspace {
  display: grid;
  gap: 0.7rem;
}

.workspace-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 2rem;
}

.workspace-bar span {
  color: #7eb5ff;
  font-size: 0.85rem;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(320px, 460px) minmax(420px, 1fr);
  gap: 1rem;
}

.panel-note {
  margin: 0.35rem 0 1rem;
  color: #aeb8cf;
}

.stack {
  display: grid;
  gap: 0.75rem;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid #2d3648;
  background: #0f141f;
  color: #f2f4f8;
  border-radius: 10px;
  padding: 0.55rem 0.65rem;
}

textarea {
  resize: vertical;
}

.subhead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0.15rem 0 0.5rem;
}

.subhead h3 {
  font-size: 1rem;
}

.link-row,
.request-row {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: 1fr 1.3fr auto;
  margin-bottom: 0.5rem;
}

.request-row {
  grid-template-columns: 1.2fr 1fr 0.9fr 0.9fr auto;
}

.row-remove {
  border: 1px solid #3b465d;
  background: #1c2534;
  color: #dae3f7;
  border-radius: 8px;
  padding: 0.4rem 0.55rem;
}

.status {
  min-height: 1.25rem;
  margin: 0;
  color: #9ec5ff;
}

.board {
  display: grid;
  gap: 0.8rem;
  align-content: start;
}

.board-top {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: start;
}

.filters {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.45rem;
  width: min(480px, 100%);
}

.profiles {
  display: grid;
  gap: 0.55rem;
}

.profile-card {
  border: 1px solid #2a3142;
  border-radius: 10px;
  padding: 0.7rem;
  background: #101521;
  cursor: pointer;
}

.profile-card:hover,
.profile-card.active {
  border-color: #4f76c9;
  background: #131a2a;
}

.profile-row {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: baseline;
}

.handle {
  color: #9eb2d8;
  font-size: 0.85rem;
}

.count {
  color: #7eb5ff;
  font-size: 0.8rem;
}

.profile-headline {
  margin-top: 0.35rem;
  color: #dce4f6;
  font-size: 0.95rem;
}

.detail {
  border-top: 1px solid #2a3142;
  padding-top: 0.8rem;
  display: grid;
  gap: 0.55rem;
}

.detail p,
.detail ul {
  margin: 0;
}

.detail ul {
  padding-left: 1rem;
  color: #dee6f8;
}

.boundaries {
  color: #ffd39e;
}

.contact {
  color: #9cc9ff;
}

@media (max-width: 980px) {
  .workspace-grid {
    grid-template-columns: 1fr;
  }

  .filters {
    grid-template-columns: 1fr;
  }

  .link-row,
  .request-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .role-actions,
  .social-actions,
  .invite-row {
    grid-template-columns: 1fr;
  }

  .workspace-bar {
    align-items: start;
    gap: 0.5rem;
    flex-direction: column;
  }
}
