/* Plain Django pages */
.stack-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.message-stack {
  position: fixed;
  top: 86px;
  right: 24px;
  z-index: 40;
  display: grid;
  gap: 10px;
  max-width: min(420px, calc(100vw - 32px));
}

.app-message {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  box-shadow: var(--shadow);
  color: var(--ink);
}

.settings-grid,
.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.settings-card,
.profile-card,
.profile-list-card,
.form-section {
  padding: 24px;
}

.settings-card h2,
.profile-card h2,
.form-section h2 {
  margin: 0 0 16px;
  font-family: "Instrument Serif", serif;
  font-size: 32px;
  line-height: 1;
}

.profile-card-head,
.profile-list-card-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.profile-card-head h2,
.profile-list-card-head h2 {
  margin: 6px 0 0;
}

.profile-facts {
  display: grid;
  gap: 10px;
  margin: 0 0 20px;
}

.profile-facts div,
.ops-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.profile-facts dt {
  color: var(--ink-muted);
}

.profile-facts dd {
  margin: 0;
  text-align: right;
  color: var(--ink);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.toggle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.checkbox-chip {
  cursor: pointer;
}

.checkbox-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.plan-actions,
.ops-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.danger {
  color: #b3261e;
}

.danger-zone {
  border-color: color-mix(in oklab, #b3261e 35%, var(--line));
}

.auth-footnote {
  margin: 0;
  color: var(--ink-muted);
  font-size: 14px;
}

.account-menu a {
  display: block;
  width: 100%;
  padding: 10px 12px;
  color: var(--ink);
  text-decoration: none;
}

.account-menu a:hover {
  background: var(--paper-2);
}

.mobile-nav-panel form {
  margin: 0;
}

.mobile-nav-panel form button {
  text-align: left;
  border: none;
  border-bottom: 1px solid var(--line);
  width: 100%;
  color: var(--danger);
  cursor: pointer;
  background: transparent;
  padding: 15px 0;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 22px;
  line-height: 1.2;
}

@media (max-width: 720px) {
  .message-stack {
    top: 72px;
    right: 16px;
    left: 16px;
  }

  .profile-card-head,
  .profile-list-card-head,
  .profile-facts div,
  .ops-row {
    flex-direction: column;
  }

  .profile-facts dd {
    text-align: left;
  }
}

/* -- Match preview bar -------------------------------------------------- */
.match-preview-bar {
  background: color-mix(in oklab, var(--brand-soft) 60%, var(--card));
  border: 1px solid color-mix(in oklab, var(--brand) 25%, var(--line));
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 14px;
  color: var(--ink-soft);
}

.match-preview-bar p {
  margin: 0;
}

.match-preview-bar strong {
  color: var(--ink);
}
