.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 310px), 1fr));
  gap: 18px;
  margin: 20px 0;
}
.hub-card {
  border: 1px solid var(--line, #303b30);
  border-radius: 16px;
  padding: 22px;
  background: #1b241c;
  min-width: 0;
}
.hub-card h3 {
  margin-top: 0;
}
.hub-card p {
  overflow-wrap: anywhere;
}
.hub-card .badge {
  display: inline-block;
  margin: 0 6px 8px 0;
}
.hub-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 14px;
  margin: 16px 0;
}
.hub-form .wide {
  grid-column: 1/-1;
}
.hub-form label {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.hub-form input,
.hub-form select,
.hub-form textarea {
  width: 100%;
  box-sizing: border-box;
}
.hub-form select[multiple] {
  min-height: 155px;
}
.hub-form button {
  align-self: end;
}
.hub-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 14px 0;
}
.hub-muted {
  color: #a9b4a6;
  font-size: 0.9rem;
}
.hub-attention {
  border-left: 3px solid #c2f76b;
  padding: 12px 18px;
  margin: 15px 0;
  background: #1b241c;
}
.hub-table {
  overflow-x: auto;
}
dialog {
  color: #e9eee7;
  background: #111611;
  border: 1px solid #303b30;
  border-radius: 18px;
  max-width: 850px;
  width: calc(100% - 40px);
  max-height: 85vh;
  padding: 24px;
}
dialog::backdrop {
  background: #000b;
}
a {
  overflow-wrap: anywhere;
}
.hub-form small {
  color: #a9b4a6;
}
.hub-card details {
  margin-top: 12px;
}
.hub-card summary {
  cursor: pointer;
}
.hub-form input[type="checkbox"] {
  width: auto;
  align-self: start;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
.hub-card ul {
  padding-left: 20px;
}
#content > h2 {
  margin-top: 28px;
}
.hub-subtle {
  border: 1px solid #303b30;
  padding: 12px;
  border-radius: 10px;
  margin: 10px 0;
}
#close-detail {
  float: right;
}
#notice {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #111611;
}
a.primary {
  display: inline-block;
}

/* Community navigation stays in the sidebar; small screens use a drawer. */
.community-navigation {
  display: flex;
  flex-direction: column;
  flex: 1;
}
.menu-toggle,
.menu-close {
  display: none;
}
.menu-overlay[hidden] {
  display: none;
}
.community-app h1:focus {
  outline: none;
}
.form-section {
  margin: 22px 0 0;
  padding-top: 22px;
  border-top: 1px solid #303b30;
  font-size: 1.05rem;
}
.form-section:first-child {
  border: 0;
  padding-top: 0;
}
.position-picker {
  margin: 0;
  padding: 16px;
  border: 1px solid #303b30;
  border-radius: 12px;
  min-width: 0;
}
.position-picker legend {
  padding: 0 6px;
  font-weight: 600;
}
.position-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}
.hub-form .position-choice {
  position: relative;
  display: block;
  cursor: pointer;
}
.hub-form .position-choice input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  inset: 0;
  cursor: pointer;
}
.position-choice span {
  display: grid;
  place-items: center;
  min-width: 56px;
  min-height: 46px;
  padding: 8px 12px;
  background: #111611;
  border: 1px solid #485247;
  border-radius: 9px;
  font-weight: 600;
}
.position-choice input:checked + span {
  background: #c2f76b;
  color: #111611;
  border-color: #c2f76b;
  box-shadow: inset 0 0 0 2px #111611;
}
.position-choice input:focus-visible + span {
  outline: 2px solid #e9eee7;
  outline-offset: 3px;
}
.position-choice input:disabled + span {
  opacity: 0.35;
  text-decoration: line-through;
}
.profile-positions {
  color: #c2f76b;
  font-size: 1.15rem;
  font-weight: 600;
}
@media (max-width: 900px) {
  .community-app .shell {
    display: block;
  }
  .community-app .sidebar {
    position: sticky;
    top: 0;
    z-index: 20;
    width: 100%;
    height: auto;
    min-height: 0;
    padding: 12px 18px;
    border-right: 0;
    border-bottom: 1px solid #303b30;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
  }
  .community-app .brand {
    margin: 0;
  }
  .community-app .monogram {
    width: 32px;
    height: 36px;
  }
  .community-app .menu-toggle {
    display: flex;
    gap: 9px;
    align-items: center;
    min-height: 44px;
  }
  .community-app .menu-close {
    display: block;
    align-self: flex-end;
    margin-bottom: 20px;
    min-height: 44px;
  }
  .community-app .community-navigation {
    display: none;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: min(320px, 88vw);
    height: 100dvh;
    padding: 20px;
    box-sizing: border-box;
    background: #0b100c;
    z-index: 32;
    overflow-y: auto;
  }
  .community-app.menu-open .community-navigation {
    display: flex;
  }
  .community-app .menu-overlay {
    position: fixed;
    inset: 0;
    border: 0;
    border-radius: 0;
    background: #0009;
    z-index: 31;
    width: 100%;
    height: 100dvh;
  }
  .community-app.menu-open {
    overflow: hidden;
  }
  .community-app .sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .community-app .sidebar .nav {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    font-size: 1rem;
    text-align: left;
  }
  .community-app .side-label {
    display: block;
    margin: 0 0 20px;
  }
  .community-app .side-bottom {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    margin-top: auto;
    padding-top: 30px;
  }
  .community-app .side-bottom p {
    display: block;
    margin: 0;
  }
  .community-app .side-bottom a {
    padding: 12px 0;
    border-top: 1px solid #303b30;
  }
  .community-app main {
    padding: 24px 18px;
  }
  .community-app header {
    gap: 12px;
  }
  .community-app header h1 {
    font-size: clamp(1.7rem, 6vw, 2.3rem);
  }
  .community-app header .eyebrow {
    font-size: 0.65rem;
    letter-spacing: 0.1em;
  }
  .community-app #reload {
    font-size: 0.8rem;
    padding: 10px;
    flex-shrink: 0;
  }
  .community-app #notice {
    top: 70px;
  }
  .hub-card {
    padding: 18px;
  }
}
