body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(90deg, transparent 0, transparent calc(50% - 1px), rgba(130, 99, 58, .035) 50%, transparent calc(50% + 1px)),
    var(--bg);
}

.control-page {
  width: min(100% - 44px, 760px);
  margin: 0 auto;
  padding: 34px 0 54px;
}

.control-masthead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 0 4px;
}

.control-main {
  margin-top: 56px;
}

.status-main {
  display: grid;
  min-height: min(560px, calc(100vh - 122px));
  place-items: center;
}

.status-panel {
  width: min(100%, 520px);
  text-align: center;
}

.status-mark {
  width: 12px;
  height: 12px;
  margin: 0 auto 24px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 8px var(--accent-wash);
}

.status-panel h1,
.management-main h1,
.confirmation-main h1 {
  margin: 0;
  font-size: clamp(26px, 5vw, 34px);
  font-weight: 600;
  letter-spacing: -.04em;
  line-height: 1.12;
}

.lede {
  max-width: 580px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.status-panel .lede {
  margin-inline: auto;
}

.management-main h2 {
  margin: 34px 0 10px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -.015em;
}

.notice {
  margin: 22px 0 0;
  padding: 11px 13px;
  border: 1px solid var(--accent-soft);
  border-radius: 9px;
  background: var(--accent-wash);
  color: var(--text);
  font-size: 13px;
}

.notice[hidden] {
  display: none;
}

.invite {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-top: 24px;
}

input[type="email"] {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 10px 12px;
  background: var(--surface);
  color: var(--text);
}

input[type="email"]::placeholder {
  color: var(--quiet);
  opacity: 1;
}

button,
.button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--accent);
  border-radius: 9px;
  padding: 9px 14px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
}

button:hover,
.button:hover {
  filter: brightness(.96);
}

.button.secondary {
  border-color: var(--line);
  background: var(--surface);
  color: var(--text);
}

.button.secondary:hover {
  border-color: var(--line-strong);
  color: var(--accent);
  filter: none;
}

button.danger {
  border-color: var(--danger);
  background: var(--danger);
  color: var(--on-danger);
}

.resource-list {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.resource-list li {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 2px;
  border-bottom: 1px solid var(--line);
}

.resource-details {
  min-width: 0;
}

.automation-client {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.automation-client form,
.resource-actions form {
  margin: 0;
}

.automation-client button {
  min-height: 28px;
  padding: 5px 9px;
  font-size: 11px;
}

.resource-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
}

.resource-list strong {
  font-size: 13px;
  font-weight: 600;
}

.resource-list small {
  display: block;
  margin-top: 3px;
  overflow-wrap: anywhere;
  color: var(--quiet);
  font: 10px/1.45 "Victor Mono", ui-monospace, monospace;
  letter-spacing: -.04em;
}

.empty {
  margin: 0;
  padding: 14px 2px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--quiet);
  font: 10px/1.45 "Victor Mono", ui-monospace, monospace;
  letter-spacing: -.04em;
}

.confirmation-main {
  max-width: 600px;
}

.confirmation-details {
  margin: 28px 0 0;
  padding: 4px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--raised);
  box-shadow: var(--shadow);
}

.confirmation-details div {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.confirmation-details div:last-child {
  border-bottom: 0;
}

.confirmation-details dt {
  color: var(--quiet);
  font: 10px/1.3 "Victor Mono", ui-monospace, monospace;
  letter-spacing: -.04em;
}

.confirmation-details dd {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
  font-size: 13px;
}

.actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
}

.actions form {
  margin: 0;
}

@media (max-width: 560px) {
  .control-page {
    width: min(100% - 28px, 760px);
    padding-top: 28px;
  }

  .control-masthead {
    gap: 18px;
  }

  .identity {
    max-width: 205px;
  }

  .control-main {
    margin-top: 44px;
  }

  .status-main {
    min-height: min(500px, calc(100vh - 110px));
  }

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

  .invite button {
    justify-self: start;
  }

  .resource-list li {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .automation-client,
  .resource-actions {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .automation-client button,
  .resource-actions form,
  .resource-actions button,
  .resource-actions .button {
    width: 100%;
  }

  .actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .actions form,
  .actions button,
  .actions .button {
    width: 100%;
  }
}
