.portal {
  max-width: 64rem;
  padding-block: 2.5rem 5rem;
}
.portal-introduction {
  margin-bottom: 2rem;
  max-width: 45rem;
}
.portal-introduction h1 {
  font-size: clamp(1.75rem, 4vw, 2.65rem);
  margin-bottom: 0.7rem;
}
.portal-home {
  margin-left: auto;
  font-size: 0.875rem;
}
.portal-session {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  background: var(--surface);
  padding: 1.5rem;
  border-radius: 0.6rem;
}
.portal h2 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}
.portal-session .button {
  flex: none;
}
.portal-entitlement {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  padding-block: 2.5rem;
  border-bottom: 1px solid var(--border);
}
.portal-facts {
  margin-top: 1rem;
}
.portal-facts div,
#pairing-details div {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 0.8rem;
  margin-block: 0.5rem;
}
.portal-facts dt,
.portal-muted {
  color: var(--muted-foreground);
}
.portal-purchase {
  align-self: center;
}
.portal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-block: 1rem;
}
.portal .button {
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 0.9rem;
  line-height: 1.6;
  min-height: 2.75rem;
  cursor: pointer;
}
.portal .button-secondary {
  color: var(--foreground);
  border-color: var(--border);
  background: var(--background);
}
.portal .button-secondary:hover {
  background: var(--surface);
}
.portal .button:disabled {
  cursor: default;
  opacity: 0.6;
}
.portal button:focus-visible,
.portal input:focus-visible,
.portal select:focus-visible,
.portal textarea:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
}
.portal-section {
  padding-block: 2rem;
  border-bottom: 1px solid var(--border);
}
.portal-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.portal-list {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0;
}
.portal-list li {
  padding-block: 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
}
.portal-list .entry-content {
  min-width: 0;
  flex: 1 1 15rem;
}
.portal-list .entry-title {
  font-weight: 650;
}
.portal-list .entry-meta {
  color: var(--muted-foreground);
  font-size: 0.9rem;
}
.portal-list .entry-id {
  color: var(--muted-foreground);
  font-size: 0.8rem;
  overflow-wrap: anywhere;
}
.portal-form {
  display: grid;
  gap: 0.65rem;
  max-width: 40rem;
  margin-top: 1.25rem;
}
.portal-form input,
.portal-form select,
.portal-form textarea {
  border: 1px solid var(--border);
  border-radius: 0.3rem;
  padding: 0.7rem;
  width: 100%;
  color: var(--foreground);
  background: var(--background);
  font: inherit;
}
.portal-form textarea {
  resize: vertical;
}
.portal-form label {
  font-weight: 600;
}
.portal-form button {
  justify-self: start;
  margin-top: 0.5rem;
}
.portal-form #defect-fields {
  display: grid;
  gap: 0.65rem;
}
.portal [hidden] {
  display: none !important;
}
.portal-pairing {
  margin-top: 1.5rem;
  padding: 1.5rem;
  border: 2px solid var(--accent);
  border-radius: 0.6rem;
}
#pairing-details {
  overflow-wrap: anywhere;
  margin-block: 1rem;
}
.portal [role="status"] {
  margin-top: 0.5rem;
  white-space: pre-line;
}
.portal [data-error="true"] {
  color: #a72c39;
}
@media (max-width: 640px) {
  .portal-entitlement {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .portal-session {
    flex-direction: column;
    align-items: start;
  }
  .portal-facts div,
  #pairing-details div {
    grid-template-columns: 1fr;
    gap: 0.1rem;
  }
  .portal-home {
    display: none;
  }
  .portal .button {
    max-width: 100%;
    text-align: center;
  }
}
